Like previous Bethesda games, Starfield has a day-and-night cycle that affects some game elements. While your character doesn't need to sleep, it is always an easy option to progress time to the next day.
Starfield: How To Advance Time
Starfield has a day-night cycle that effects when the sun is out and when shops are open, here’s how to wait and advance time.