The problem is loyalty pressure - the AI usually builds in a dense grid, four hexes apart, and if you take a city that isn't out on a limb and more than 9 hexes away from your nearest city, the loyalty pressure from nearby enemy cities will exert enough pressure to flip it. You can try and counteract it by sticking in a governor (+8 loyalty), but if the pressure is high enough, the city will flip in four turns or less, which doesn't leave enough time for a governor to establish. You can ready yourself for the situation by stacking policy cards which increase loyalty of cities with a governor, but those aren't usually available in early game, and you can build or repair the monument ultra quick, which will gain you one loyalty point. And you can also have a settler ready to either forward settle before attacking, or to drop in really fast after attacking - the former tactic works better, especially if you can drop Magnus in and chop lots of rainforest and swamp etc to get the pop of the forward settled city up fast - which increases your population pressure.
If you examine the city status after you have captured it, but before you have formally taken it, the best rule of thumb is that if the negative loyalty is too far on the wrong side of 10 (8 for a governor and 1 for a monument) then it is sometimes better to raze it. Alternatively, you can wait for it to flip, pillage everything in sight around it and take it again, but you lose population every time you do that. One strategy, if you have the troops available, is either to wear down the defences of a couple or three cities to zero and take them all at once, thus excluding the worst of enemy loyalty pressure - in which case, put your governor in the biggest city you take, especially if it is on the enemy civ side of the clutch you have grabbed. Another is to forward settle and then snipe a big city, before taking out the smaller ones nearest to your civ's border one by one.
And have a great holiday, now I have to do roast potatoes.