How do I get the 'Find My' map back in the Messages app 'details' popup on macOS?
The easy way to get a known good system and all Apple apps is to boot to recovery and reinstall the OS. Since you now know your system is corrupt in some way, I would make a full backup using Time Machine or equivalent tool if you don’t already have everything you care about on different storage.

https://support.apple.com/en-us/HT204904

Reinstalling doesn’t delete anything by intent, but if your disk is corrupt, you could lose data when the filesystem heals itself. Also, if the cause is a hardware issue, any use can cause data loss and an installation moves a lot of files.
An erase install or testing in a new user account take more time, but are also good options to diagnose / fix this.