You'll
never be able to get ALL the AI "on your side" unless playing a very small map and grabbing ALL the religions.
What you need to do is pick a set of friends for the game (usually your religious buddies) and do whatever you can to appease and please them. The rest of the civs you can snub for the most part. I usually check the F4 relations menu to see what my friends think of the other civs that aren't the same religion. Sometimes they can be buddy buddy anyway and I'll try to stay on (at least) neutral terms.
When you're chosen buddies ask for free techs, give it to them. Unless they are WAY GREEN and are tech leaders, then you may be able to deny them the help. But don't do it more than once.
Trade with your chosen friends a lot. Resources for resources or resources for gold/turn. And if you have a good tech lead on them, go to them and ask for a lower amount of gold than your tech is worth and sell it to them.
Don't bother if they already have a +4 "trade relations have been fair and forthright" because that is the maximum you can go.
When you're friends ask you to go to war with a common enemy, unless they are near to you and have a large military, ALWAYS accept. It's a good way to guarantee friends.
If a friend asks you to go to war with another friend, then weigh your decision. Are you going for a diplo win? If so, then decide who has more votes to offer and side with them. Of course, if one of the two civs at war will be your rival in the race for diplomacy (IE largest population), then side with the smaller civ. If ur not going for a diplo win, side with the more powerful of the 2. Usually the more aggressive leaders with be the only ones to go to war with religious allies.
Open borders is a good way to add a small modifier to your friendly relations. But beware of keeping open borders with enemies of your friends. It will give negative modifiers for "trading with worst enemies".
Also, if a friend asks you to stop trading with a neutral or enemy civ, do it. Even if you're getting GPT or a resource. Unless you are planning on backstabbing that friend any way
hope I helped!
BTW, welcome to the forum!