Can macOS change the @ symbol to be located with the "Q" key? I want the @ symbol to be on the "Q" key.

I need to switch between Linux and Mac daily. I don't want to think about which keyboard is under my fingers.

My ThinkPad keyboard is connected via USB to the MacBook. It works fine, except that the @ symbol is at the "L" key and not on the "Q".

I could not find a way to change the configuration of the Mac to match my needs.

How to solve this?
Go to System Preferences > Keyboard > Input Sources and make sure this is set to "German Standard" and not "German".

If this does not do the trick, or if you do not have the choice of German Standard, then it is pretty easy to make a custom layout to put this character anywhere you like with the app Ukelele.