They both scratch different itches. Starfield is more about the story, whereas NMS is about pure exploration.
Starfield is more grounded in what could be real and I love it for it, if they had the transitions of NMS I'm sure it would have rocked, but the load screens killed the game. Additionally, Starfield has a significant advantage that NMS lacks, namely mods.
NMS has the exploration down to a T, always interesting to see what you're gonna find next. Ship building also allow for more freedom, well if you use em glitches that is.