I get the PS5 and wanted to buy the Spider-Man: Miles Morales Ultimate Edition as the first game. Ultimate Edition means that the first part (Marvel's Spider-Man) is also included as a full game. However, I would then play Miles Morales and then Marvel's SpiderMan, because Miles Morales just plays completely in winter. Is that bad if you only play the first part afterwards?
In principle, of course, that's not bad. But from what I heard and since I played the game (the first part) with all the DLC's, I would recommend you, from my own experience, to actually play the first part first, as there are some really surprising moments or plots gives. Which will be spoiled for you when you look at the summary that runs before Miles Morales is started. I could imagine that this would negatively affect the gaming experience.
You can play Miles Morales first, of course. Miles has more of a supporting role in the 18er Spider-Man and you only see things from his life before the bite and the bite itself. But would really play the 18er Spider-Man beforehand. Gives unexpected moments that could be spoiled once you play Miles Morales.