Confused about game progression development/day night cycles

Complete newb.

I have several questions that I can’t find the answers to.
I want to create a system where the player awakes in the morning, runs through an entire day, and progresses to the next day once they go to bed.

That’s befuddled me. That an trying to understand when and how an NPC knows when it should give certain dialogue