Games are either physical - in which case you simply install them where you like, however you'll always need access to the disk or digital, in which case they are tied to the account, not to the machine.
You cannot simply copy things from one PS4 to another and you cannot copy things from one PSN account to another.
If a single account is being used on the 2 PS4's then no problem - just download what is missing on the PS4 you want as the "main one". If it is different accounts, you'll need to login to the PS4 with the "other account" and download the games directly.
However, saved games cannot be transferred between accounts, but can be transferred between consoles (via USB backup).