It is very hard to not get on the wrong side of the AI. Many things can occur that are not completely in your control. You can have trade deals that are broken through no fault of yours, such as a resource being exhausted, lux having its road cut or you lost the harbour that was the genisis of the trade route. IOW you can inadvertently break an agreement. You may be in a form of government that they shun. At some point the zero sum land game kicks in and they can not grow unless they take tiles from someone. If they think you are too big, too strong, too weak, not making fair trades and on and on.
I dislike the UN . I prefer the Moo scheme where you get to vote based on your empire. Why should a 1 city civ get the same vote as a 40 city civ?