It will really depend on your patience, how large you will let the library grow, also, whether you are planning to use iCloud Photos or not. If you are using iCloud Photos the available storage on your smallest device will be the bottle neck.
I asked at the Genius Bar at the Apple Store in Hamburg and in Berlin, and both told me not to let the library grow beyond 20000 photos, but that will only apply, if you are using iCloud Photos and have to consider to keep your library small enough to fit on your iPhone with the smallest storage, also on your patience, if you cannot stand to have to wait a few seconds, before a photo opens.
Photos is supposed to be able to hold a million photos, as Yer_Man pointed out, but some tasks are annoyingly slow, when the library is getting large. For example, upgrading the library to a new system version can take more than a day, if the library is large. Also, the artificial intelligence scan for faces, objects, screen recognition and the advanced search is needing a lot of computation time and will be slow, if the library is large.
My System Photos Library is just having a moderate size of 80000 items, but after the upgrade to mac26 it took more than week to scan the library again, before the search found anything.
Be prepared to wat for day, if a large library needs repairing.
It will also depend on the number of albums and smart albums and keywords you are planning to use. The graphical user interface has not been designed for a large number of albums and keywords. It helps to keep the Photos Libraries focused on one thematic project, so we do not need many albums, and keywords.
My System Photos Library is heavily structured with folders, albums, smart albums, and on my Mac in Photos I can find all photos quickly, but not in the Media Browser, it is only showing a flat list of 2000 albums, and not on my iPhone and iPad, because the smart albums and keywords are missing.
Also the list of keywords is hard to manage, because the Keywords Manager is also only showing a flat list of keywords.
I have to keep the number of smart albums small, at 50000 photos and 200 smart albums Photos started to hang or become very unresponsive. Now I am deleting most smart albums as soon as I am done with the corresponding photos and copy the photos from the smart album to a standard album. When I start working again with the same albums I recreate the smart albums for that project.