This issue has been quite prevalent since the August 2019 patch. We have a thread running on it over at Answers HQ here. When the user tries to access the gallery and/or their Library the game will freeze but more often than not, crash.
SimsQARobo has helpfully suggested accessing the Gallery through a web browser but there does seem to be another fix which is working, it involves trashing a game file, EAWebKit.so, which rebuilds itself after a game repair.
- Right click on the Sims 4 in your Applications folder and select Show Package Contents
- Navigate to Contents > Frameworks
- Drag the EAWebKit.so file to the Trash
- Open Origin, right click on the game in your Games Library and select Repair Game
The file will be recreated after the repair and you should now be able to access the Gallery and your Library again.