When you save a new file that has the same name and size as another one on your Mac OS X, the Mac operating system will always ask you if you'd like to replace the file that already exists. When you have picked the 'Replace' option, the file labeled with the same name as your new file is overwritten. That is what we call an overwritten/replaced file.
Generally speaking, if you have backed up your Mac with Time Machine or iCloud before, you can recover the overwritten file using Time Machine or iCloud. But it seems that you don't have any backups either in Time Machine or in iCloud, then the data recovery software should be your last option to retrieve your lost overwritten file.
However, most commercial data recovery software in the market keeps updating to be compatible with the recent macOS version and the older data recovery package has been abandoned, which means you need to update your Mac to a macOS version that supports downloading and using the data recovery app.
Here, taking iBoysoft Data Recovery for Mac as an example. iBoysoft Data Recovery for Mac is a professional data recovery software that can easily recover replaced files on Mac. This powerful data recovery tool works on macOS 13/12/11/10.15/10.14/10.13/10.12 and OS X 10.11 and is compatible with Intel Macs and Apple Silicon Macs with M1 and M2 chips, which is also able to recover emptied Mac Trash.
If you decided to use iBoysoft Data Recovery for Mac to retrieve your replaced file, you can update your Mac to Mac OS X 10.11 first, and then use the Search for Lost Data function to start scanning all lost files on your MacBook. Once the scanning process is finished, you can filter all recoverable files by different file formats so that you can quickly pick up the replaced file you need.
Select the file, and click "Recover" to retrieve it from the Mac disk. Rember to not store the recovered file in its original place to avoid data loss.
Attention, please! If you don't want to update your macOS or you're worried about updating macOS will erase/overwrite data on your Mac internal drive, then you can try an open-source data recovery software to retrieve your overwritten file, such as TestDisk. Most open-source data recovery app is not maintained anymore and should be available on Mac OS X 10.6.8.