To link your Epic Games account to your PS4, you need to follow these steps:
Create an Epic Games account or login to your existing account.
Go to the Epic Games website and click on "Account" in the top right corner.
Click on "Connected Accounts" and then click on "Connect" next to the PlayStation Network icon.
Follow the instructions to link your PS4 account to your Epic Games account.