Did you change the Computer Name or the name of your macOS home user folder? Changing the Computer Name should not have any negative affect on your local files. It sounds more like the latter.
Here is an Apple article with instructions for changing the name of the home user folder (every step must be performed as listed or you will break macOS):
Change the name of your macOS user account and home folder - Apple Support
.....if this is where you made the change, then you will need another existing macOS admin user account to fix the problem. Otherwise you will need to start over by erasing the Mac & restoring from a backup made prior to the change.
Erase your Mac and reset it to factory settings - Apple Support
If you don't have a backup, then you will need to take the computer to a local Apple tech who can try to access the data on the drive, but this may not be possible on some more recent Macs due to the hardware, software, and security changes (it certainly is not easy). An Apple Store is unlikely to be able to assist in this endeavor, but it never hurts to ask.