Most games handle this with a large array of boolean (in some cases integer) story flags.
Your dialogue system should be able to check these flags and trigger different dialogue lines depending on whether or not certain flags are set.
Example: When the player completed Quest X, you set QUEST_X_COMPLETED to true. When the player completed this quest with the evil choice, you also set QUEST_X_EVIL to true. But when the player completed this quest with the good choice, you instead set QUEST_X_GOOD to true.
Now the NPC involved in that quest would check those flags. If QUEST_X_COMPLETED is false, they tell the player to complete Quest X already. When it is true, it thanks the player for completing Quest X. When QUEST_X_EVIL is set, they then call out the player for being such a meanie. When QUEST_X_GOOD is set, they then call out the player for being such a wuss.
You might also need a system which allows you to use story flags to decide whether or not certain objects in the game appear at all. So certain objects will only be there when the story requires them to be there. Is your game one scene of many scenes? When your game has many scenes and the player frequently switches between them, then it might be sufficient to have a script which checks the story flag for that object in
Start() and then calls
SetActive(false) when the required flag isn't set. But if you require that certain objects appear immediately within the same scene when a certain flag is set, then you might require a separate controller object which takes care of monitoring story flags and activate game objects as soon as their spawn conditions are met.
The current time of day should also be a set of story flags. So you can use the same system to check flags like TIME_IS_MORNING or TIME_IS_EVENING in your story system and your game object activate/deactivate system.
(By the way: It's fortunate that you want a system where time advances only at predictable moments and not a real-time daycycle where the time period can change at any time. Because with a real-time system you would have to find a solution to what happens when an NPC is supposed to spawn/despawn while the player sees or even interacts with it. Such a game mechanic can get really glitchy if you don't remember to think of all the edge-cases)