A PC can play most of the games a PS5 can, except a few PSN exclusives.
It has everything all in one place, such as a web browser, a file explorer, and any other programs you want. You can use as many peripherals as you want on a PC, PS5 is limited.
Third, PS5 is around $500 for the disk edition, $400 for the digital edition. The *average* gaming PC is around $1,100. A good PC that can play higher end games will run you about $2,000-$4,000. If you can afford a PC, you can definitely afford a PS5.