Hello and welcome to this forum.

Please provide us with all of the information that is asked for in https://retropie.org.uk/forum/topic/3/read-this-first to help us pinpoint the problem.

Can you save anything on the sd card? Some cards go to read-only mode if they're starting to fail. If you can't save anything on the card, it may be time to replace it.

Do you have another sd card to test it with?

Retropie saves the controller configurations in the directory /opt/retropie/configs/all/retroarch/autoconfig/. Is anything being saved there? The configs are stored in files that match the controllers' names (e.g. DragonRise Inc. Generic USB Joystick.cfg).