Do you think it's a better idea to attack early in the game, while the AI is weak, or to wait and build up an economy
My thoughts come from a person who doesn't do Domination victories because I find warmongering too tedious as a victory condition. That isn't to say that I don't war, because I certainly do!
If the AI plops some city right next to you to nail down a single luxury from a million miles away, you should immediately destroy it and either raze or puppet. This happens really early most times. You can't let those stay or they'll use them to assail you later. You can get a free worker that way. You can also get backstabbed by William or Washington or one of the other weasels doing that, but that's just more exp for your troops and a few extra gold when they plead for peace later.
In one notable encounter, I took down Ramse's capital early, and when he pled for peace he gave me the other of his cities I had on my docket, sparing me the effort of assaulting it. In another, Catherine was idling her capital and one other city, and declared on me with a ragtag army. I quickly wiped her off the face of the planet, and her two cities folded into my empire consolidating an entire resource-rich peninsula at about turn 150.
If you desire a nearby AI capital, you need to take that out early, before they get walls up. I like to provoke them into declaring on me if possible, then destroy their invading army, then take their capital. I'll usually end up conquering four cities maybe two of which are capitals this way, and it's always very early in the game.
Once my economy is rolling, I don't usually bother with anymore wars unless it's defensive. I have taken everything I want or need, and have punished those who encroached into my territory. Then it's usually on to a Science victory at about ~325.