I'm a newbie so take this advice with a grain of salt. I
am playing huge & gigantic galaxy, Challenging, random races, random race AI. You didn't say what you're playing, so if its like masochistic or something, skip my post

The 1st stage of the game is Expansion. You gotta get out there and find the cherries (artifacts), resources, and planets.
I always research in this order: Xeno Research, Star Cartography, Sensors. Then I alternate between good engine techs or Economics. Once you get Sensors and decent engines, design a faster Surveyor, Colonizer, and Constructor. Send out at least 6-10 fast Surveyors in different directions & put 'em on Auto-Survey.
Once you find good habitable planets (or, if the games on Habitable being rare, ANY habitable planet)
immediately send a fast Colonizer after it. When I colonize a planet, I :
1. Buy the first Factory
2. Focus it on Social production
3. Set a Stardock to be immediately built
4. Once its built, the new planet (and they get farther and farther away) begins building Colonizers.
If there's more than one planet in a solar system and the one I'm colonizing is crappy, I often won't build a starbase, but I always try to if I can.
When you meet & greet other races, note which direction they are expanding in, and try to beat them to it. Flank their expansion efforts. I like to plunk a scout or something along their major planets. Once I see a Colonizer of theirs, I click on it to see where its going, and then immediately try to get my Colonizer there first. Note you'll probably need good espionage on them to do this (another thing I do, immediately budget espionage money on all races I meet, even "friendlies").
Best buildings to have are Economy-based. Money is the #1 thing to focus on in the game. Try to put at least two markets on every planet.
Good luck!