Code styles are applied on a project level. There is no global setting. You can set a default style via Settings > Other Settings > Default Settings > [Template Project Settings] > Code Style Any new project will use that style.
That said... when you reformat you should get the styles you set. You need to verify that the configuration you created is set in the Settings > [Project Settings] > Code Style --> Scheme dialog. I seen some case where the default is actually reselected by mistake. You may want to double check the specific setting options in that scheme. Make sure the same code that is shown looks exactly like what you want.
Then run a code Layout reformat (Ctrl+Alt+L)
Answer from Javaru on Stack OverflowCode styles are applied on a project level. There is no global setting. You can set a default style via Settings > Other Settings > Default Settings > [Template Project Settings] > Code Style Any new project will use that style.
That said... when you reformat you should get the styles you set. You need to verify that the configuration you created is set in the Settings > [Project Settings] > Code Style --> Scheme dialog. I seen some case where the default is actually reselected by mistake. You may want to double check the specific setting options in that scheme. Make sure the same code that is shown looks exactly like what you want.
Then run a code Layout reformat (Ctrl+Alt+L)
Latest AMD Software version overrides Ctrl + Alt + L.
It's a shortcut for Performance logging.
In order to unset it, go to AMD Software and select
Settings(gear icon)->Hotkeys->And replace that combination with something else:

BTW, I struggled a lot until I found what was intercepting that Intellj Autoformat hotkey...
Reformatting my code in IntelliJ isn't working.
"Reformat Code" can not be called via the shortcut "⌘⌥L"
Reformat code via keyboard shortcut doesn't work in IntelliJ - Stack Overflow
Reformat code in IntelliJ IDEA (macOS) does not work - Stack Overflow
If I open IntelliJ IDEA 2024.3 (Ultimate Edition) on macOS ⌘⌥L to reformat code works at first. After a while it stops working. After it stops working I still can reformat code via the Menubar.
Any thoughts?
Check that your keyboard shortcuts are configured. To do this, press Ctrl+Alt+S, navigate to Keymap, open up Main menu drop down, open Code folder and check that Reformat Code has a key combination set. You can also find Reformat Code via the search bar.
Shortcut for formatting the code is (SHIFT + CTRL + ALT + L)