Spark timing is a tricky thing, not quite that straight forward because of the changing conditions
When spark happens in the cylinder it takes time for the ignition point, at the spark plug, to spread enough for the "explosive power" needed to push down the piston
The timing you want is to have this "explosive power"when piston is After TDC,
10-15deg ATDC, this gives the connecting rod the best Leverage to push down on the crank journal, adding the most power to its spin
Too early or too late and you get less power
So let say spark at 10deg BTDC gives "explosive power" at 15deg ATDC
12deg BTDC changes it to 13deg ATDC
So 25deg of travel from spark to Power
But thats at 700RPM, what about 3,000RPM,
piston is now moving from 10deg BTDC to 15deg ATDC MUCH faster
Assuming the time it takes from spark to "explosive power" stays the same then you will need to advance the spark to happen at 20deg BTDC so "explosive power" happens at 15deg ATDC.
That's what the springs and weights did in a distributor, as RPMs increased spark was advanced to give the spark enough time to get the "explosive power"
But here's the other layer, spark to "explosive power" isn't the same time length, lol, it varies by air:fuel mix.
Richer mix gets to full "explosive power" faster than leaner mix
That's where Vacuum Advance came in for distributors, idling or cruising along vacuum is high so advance was high.
When you "stepped on the gas" fuel mix gets Rich and vacuum drops so advance dropped and quicker burning Rich mix could still hit the 10-15deg ATDC window
That was the mechanical methods, computers do this now, they use coolant temp, RPM, throttle position, air:fuel mix and engine load
And they are pretty good at it, if there is an EGR system the computer will be programmed for a more "aggressive" spark timing, than a non-EGR engine.