You can play PlayStation 4 games on a PlayStation 5 because the PlayStation 5 is backward compatible with the PlayStation 4.
You can partition a hard drive in Windows 10 to create dedicated portions of the hard drive that your computer will recognize separately.