the AI act like players in some regard, if they see that you are expanding and are getting ahead of them, they will denounce you and hopefully ruin trade lines for you.
my suggestion is to befriend them early, from the get go whatever advancement you give your civilization will result in negative AI "points" so sooner or later they will announce you, but gains from befriending them early will offset that and they'll likely leave you alone the entire game if you do enough for them.
when you discover horses, send a horse to various AI civs for free, that gives a HUGE boost to AI friendship in the beginning and you'll be swimming in DoFs and trade caravans soon. Trading with other civs also gives a decent trickle boost to AI friendship and will be enough to offset the ever decrease from civ advancement
I play on Immortal usually and I always send my horses away for allies, I start to outpace AIs starting the medieval age and am usually far ahead by Renaissance, but I've still rarely been denounced before Industrial age 😛