On the PS5, physical games can be shared just like the PS4, by sharing the physical disc with friends and family. Obviously, this isn’t possible on the PS5 Digital Edition due to no disc drive.
As for digital games, the PS5 uses the same restrictions and protections as the PS4. Digital purchases can be shared with any users on the main PS5 console (i.e. your Primary console), and only for your account on any other console you are signed into.
So, in theory, you can share games with one friend or family member if you set their consone as your Main one, and then continue to play games for your account on your own console. Moving between different consoles isn’t easy (just like the PS4) as you can only have one Main / Primary console at a time.
This is a little more complicated for PS4 games that have been upgraded to the PS5 digital version, which still required the PS4’s disc (if it was a physical game). Although the PS5 version of the game is digital, the physical PS4 disc is still required to play the PS5 game, so these games wouldn’t be easy to share between different consoles.
The PlayStation Store has the following license notice:
You can download and play this content on the main PS5 console associated with your account (through the “Console Sharing and Offline Play” setting) and on any other PS5 consoles when you login with your same account.