I’ve set this up before — to game share on PS5, you just need to log in to your friend’s console with your account, then go to Settings → Users and Accounts → Other → Console Sharing and Offline Play, and turn it on. After that, your friend can access your digital games. They’ll do the same on your console so you can share each other’s libraries. Just remember, you can only have one primary console per account, so choose carefully.