Here is the science-based thermodynamic law that drives all this.
Suppose you have 2 spaces, A and B, at different temperatures. Between them, there is some level of thermal insulation.
No matter what is true about the insulation, this rule always follows:
Thermal transfer is proportional to the difference in temperature.
Take any random insulator (green) that happens to have nice round characteristics of passing 1000 BTU/hr per degree F difference:
You can see where keeping this thing cooler will result in less temperature differential.
How to apply this law to the question at hand
This is for a physics lesson, and includes exaggerated hypotheticals for educational purposes, designed to be illustrative rather than real-world numbers.
Two "example" houses. One is kept at temp, the other managed with a programmable thermostat which turned the heat off at 7:00 and kicked the heat back on at 3:30 so it'll be comfy at 6:00.
And let's presume cloudy day with constant temp, just for simplicity, because we're here to understand a law, not model a complex system.
Obviously the insulation factor, thermal mass and heating capacity of this house are unusually bad, and the "constant-temperature day" is unrealistic too. But we're here to learn. Some of us, anyway: for others, this is an 'inconvenient truth'.
What's positively true is that the house on the right lost less heat.
Here's the thing: Heat not lost is retained in the house. The house on the right had to make less heat simply because it lost less heat. Yeah, the house on the right has to run the furnace hard in the afternoon "to catch up"... but since furnaces run at only one speed, the simple fact is that the right house's furnace had to run less time in total than the left house's furnace. We know that because the house lost less heat, and there'd be nowhere else for the heat to go.
Except it's more extreme because of solar gain
In our house, the mornings are cold, and the furnace runs of course. And it runs all morning. But, solar gain has been heating the house's exterior, chasing off the cold of night... and this heat starts penetrating the insulation and warming the house in earnest. Since the house is already at 70F thanks to the furnace, the solar gain not only holds it there but also warms the house further - sometimes too much! So the furnace does not run again until dusk. We were there the whole time because of COVID, but imagine if a programmable 'stat had shut off our heat at 8 am.
The furnace would not have run. The house would cool off, and would be ~50F when solar gain really starts pounding on the house. The solar gain would lift the house to 70F just as we arrive home to enjoy it. The difference being, with a programmable 'stat, we would not have been 'out' the fuel costs in the morning. So a programmable 'stat lets you make better use of that solar gain, by letting house temp take a "morning dip".
Now, what does a 'smart stat' bring to the picture? In this hypothetical, the dumb programmable starts heating at 3:30 and reaches target temp at 6:00. On a 60F day it would also start at 3:30, be at target temp by 4:30 and waste the heat for an hour and a half. A smart 'stat would know exactly when to start. Again this is exaggerated for educational purposes.