How do I sync my ps4?
What you are asking is very ambiguous, without more information or screenshots I cannot come to a conclusion as to why your games are not in sync with your PSN profile. There isn’t a magic button to do this.
But here is what you can try, logging off and logging back in PSN, wait a few days because I know sometimes it takes a while for the data to be in sync on PSN. Also set your current system as your Primary PS4 system, you can do this in settings. Although I doubt this will help.
If all else fails you can certainly contact the PlayStation support, use their live chat and try to resolve this issue.