Please note, restoring licenses won't affect your data.
Go to Settings > Users and Accounts > Other > Restore Licenses.
Select the licenses that you want to restore.
To restore a license directly from the home screen or your game library, go to the game, press the options button, and then select Restore License from the menu.
Go to Settings > Account Management > Restore Licenses.
Select Restore.
When should I restore PlayStation Store licenses?
Restoring licenses can be helpful if you’re experiencing the following issues:
A game has a padlock icon (not related to the expiration of your PlayStation Plus subscription).
You can't locate a game or add-on.
A game crashes.
Still having game issues?
Try enabling PS5® Console Sharing and Offline Play or activating your PS4® console as your primary PS4 console. You can also find further troubleshooting steps by visiting the guides below.