Hold Alt (Option) when starting the Photo app to invoke a dialog where you can select custom photo library location.
You can have multiple photo libraries in different locations and switch between them during Photo app start.
https://support.apple.com/guide/photos/create-additional-lib...