The controls section of retroarch havent changed in a long time, so older guides are still fine. You need to set them first without a game or core loaded in the main interface by going to Settings/Input/User 1 binds and setting your controls there. These will be the default controls across the UI and most cores.
Then you can load a game in the core you want to change the buttons in, and this time instead of going to the main settings you use the Quick Menu/Controls section this will change the controls for just the loaded core or game, depending on how you save it as in the same menu will be a "Save Core Remap" and a "Save Game Remap", use the one you want in that case.