If you buy Miles Morales for PS4 however, you can either freely upgrade to the PS5 version or pay 20 bucks extra to get the Ultimate Edition which has Spider-Man: Remastered

FWIW, your PS4 version will still work on PS5 (without upgrades of course)

— Nibel (@Nibellion) September 23, 2020