Excluding the free starting warriors from turn 1, how exactly is the AI getting so many units in early game? Are they actually building them (with reduced production costs)? Are they buying them (at massive discounts)? Do they automatically get free units throughout the game? I can't figure out how they are building so much infrastructure/wonders while also having so many units.
https://civ-5-cbp.fandom.com/wiki/AI_and_Difficulty
AI does not receive discounts on unit Gold costs, but they do get Production discounts (increasing with each era) on the cost of combat units, and periodic yield bonuses including Production and Gold (see the "AI Handicap Bonuses" section), scaling with difficulty.
This is true for all difficulties except Settler, where they gain a 10% increase for all Production costs, and no per-era discount or periodic yield bonuses.