like trying to figure out how to speed up making Hoover Dam while 4 turns behind the Aztecs.
One option is using a pre-build. This strategy involves starting production on a "dummy" unit, improvement or wonder before the desired wonder is available to build, then switching to the desired wonder once it has become available. The game counts the shields spent on the dummy build towards the now switched-to wonder, giving you a head start. With careful planning you can time your wonder to complete the turn it becomes available.
A second strategy involves "micromanaging." This means adjusting which tiles the citizens of a settlement work to fine tune your strategy. An example would be to make citizens work food-rich tiles neglecting shield production, or, in your specific dilemma, stifling growth to maximize shield production. Keep in mind you risk starving your city, which can lower your population. This only happens when the food box is completely empty, running on a food shortage for a few turns can be a useful tactic to earn more shields. There is always a happy medium. Over 20 turns of wonder building you could be optimizing food waste to promote both population growth and shield production. Any excess shields are wasted. If your city is producing 20 spt but only needs 17 shields to complete a wonder, shift some citizens to more food-rich tiles so that you only earn 17spt but more excess food than you were earning. A good application of this is tile-sharing in which you make several cities work a certain high importance tile on alternate turns so that all involved cities experience a boost as opposed to only one city.
The more turns the Aztecs have left on the build, the better your chances are to make up the production difference. Be creative. Mining some tiles that you would normally irrigate, or vice versa, depending on your needs and available terrain are useful tools. Stacks of workers are important here. You could potentially alter each tile each turn to help your cause. Just because you mined that grassland wheat at the beginning of the game doesn't mean you can't irrigate it now to give you more food.
On higher levels, when the ai get lower production costs than the human player, these tactics are almost required. Also keep in mind in a despotism any tile that produces at least 3 food, shields or commerce will produce one less. Meaning I will often irrigate some grassland tiles after switching out of a despotism.
P.S. think about tile-sharing in the context of corruption. If you have a city whose 6th shield is corrupt you can often micromanage your city to only produce 5spt but maximize commerce or food. Production and commerce are subject to corruption, but food is not. Building workers or settlers from corrupt towns will keep those corrupt towns small to decrease waste while still offering use for your empire.
I believe there are war academy articles on all of these topics, which would be good supplemental reading. There's also an article about science farms which is more applicable to larger map sizes, but also useful as it discusses the use of scientists which you may not be very experienced with using.