Are you sure, Photos is freezing (meaning you will get a hang report, the you look at the Console logs) or it Photos just slow and spend several minutes before the library is closed? How large is your library? And is the system version given below your post still valid "macOS 10.13". The reason I am asking is because Photos 3 on High Sierra tends to postpone to save any updates to the Photos Library, until we are no longer using Photos. I have seen Photos being busy to update the Photos Library for ten minutes after I quit it. It has not been hanging, but just been unresponsive and very busy, doing its thing. As your Mac mini is not a portable Mac that you need to carry around, there is usually no reason to force quit Photos at all, unless you want to switch to a different Photos Library. Try to wait, until Photos has finished closing and saved all new updates to the Photos Library. A Force Quit can damage the library and leave it in an inconsistent state. If you repeatedly force quit Photos, I would make a backup and repair the library. ( Repair the library )
If Photos cannot close the library, even after a long, long wait, you may want to check, if you are having legacy media in the library, that cannot be processed by your version of Photos. How to Weed out Legacy Media in Photos for Mac - Apple Community