Yes, the PS5 can do 8K games, however that will very rarely be something that games developers will strive for when making PS5 games. The reason for this is that making the PS5 (and the Xbox Series X, for that matter) render at 8K resolution takes up a very huge amount of processing power.
Many PS5 games developers are looking to spend that processing power on other features such as improved visual detail, larger worlds, better AI and so on. Additionally, more processor efficient and improved super sampling techniques are often preferable these days too, not least because they allow games that run in lower resolutions such as 1440p to look much sharper than they otherwise would.
Simply put, the PS5 games which do run at 8K resolution will very likely be much older games that have been remastered, or, are relatively simplistic looking affairs that will lack many cutting edge next-generation visual features.
Quite unlike having PS5 games that run at 8K, streaming video at 8K resolution is much easier and less processor intensive thanks in no small part to a nifty encoding/decoding chip that deals with 8K video streaming exclusively.