Once you replace a folder with a new one, the only two solutions you can count on are to restore from the backup drive and to use professional data recovery software. If you have enabled Tima Machine to back up your computer, launch Time Machine > find the original folder you want to > click Restore to bring it back. If you have no backup, go to use data recovery software instead. iBoysoft Data Recovery Software is designed with stunning disk scanning skills and data recovery algorithms for you to recover deleted/replaced/lost files and folders from both internal hard drives and external hard drives on Mac and Windows. You can download and install it on your computer to perform replaced folder recovery!
Related article: How to Recover Overwritten/Replaced Files on Mac (4 Ways)