Theoretically, reinstalling macOS should erase the Mac data. You may mistakenly choose to erase the Mac startup disk to clean install macOS on it, or some other incorrect operation and system glitches may cause the issue.
Have you backed up the Mac before updating and reinstalling macOS? If you have backed up the Mac with Time Machine, iCloud Drive, an external hard drive, etc., you can easily restore the lost data from the backup.
If there is no backup, you can also try third-party data recovery such as iBoysoft Data Recovery for Mac. You should not write new data to the drive such as create new files, once the deleted files on the hard drive are overwritten, you can't recover them back.
You can free download and install this data recovery software, free scan the reformatted Mac hard drive to see whether the lost data can be restored, free preview the scanned results, and then recover the desired items to a different location.