I use the five keywords:
★★★★★
★★★★☆
★★★☆☆
★★☆☆☆
★☆☆☆☆
with shortcuts "5", "4", "3", "2" & "1". Searching seems to work fine with macOS Catalina 10.15.4. If you want to find items with a specific number of stars, you just search for items with a specific keyword. However, if you can also find items with, e.g., "3 or more stars" or "2 or fewer stars" by using the smart album "Text" criterion. For example, to find items with "3 or more stars", I use the following smart album:

Here, the criterion "Text is ★★★" selects items that have keywords that contain the string "★★★", which means the items will have any one of the keywords:
★★★★★
★★★★☆
★★★☆☆
There is one caveat that I think is work mentioning: Although the smart album "Text" criterion does work correctly for me in the way that I show in the image above, it appears to me (Read: I am only guessing, but experience shows that this is likely true) that the smart album "Text" criterion is dependent on metadata that background macOS processes are responsible for maintaining. As a result, smart albums that use this criterion do not return the correct results until this metadata is updated. This means that you may need to wait some seconds or even minutes after you make changes in Photos before such smart album return the correct items. Sometime, it even seems to help to quit and then restart Photos, although I may just be acting overly cautious here.
Presumably, the smart album I show above will also find items where the string "★★★" appears in the title or description of an item, but this situation is unlikely, since "★" & "☆" are unicode characters that one does not normally type when entering text with the keyboard.
Of course, you need to ensure that you do not assign multiple keywords for different numbers of stars to items, but that can be monitored and corrected with special smart albums to locate such items.