Your goal is to grow big and have many citizens. Many citizens provide lots of gold, research and production. In the beginning of your game, growth is your absolute priority.
Growth comes from food. every 20 food in the box makes a citizen. You start out with 1 town and 2 food per turn if you have no bonusses. Now the idea is to expand this 2 food per turn as fast as you can.
Building a granary effectively doubles it to 4 food per turn since you only need half as much in this town for a citizen. Building a settler makes probably 2 extra food per turn as well.
If however your capital has a food bonus, you may start out with 5 food per turn. A granary will now effectively be worth 5 food per turn as well.
If your second city can make more than 2 food per turn, your settler would also be worth that much food per turn.
Therefore, in early game the rule is to make you choises based on that. Do whatever provides the most food per turn and does so fastest. (settlers are build faster than granaries, so if they are worth the same food per turn, a settler is better)
Units are just to fill the gaps in this phase. If you don't have the population to build a settler, maybe you build a warrior first to make it fit.
No buildings are worthy enough to build now.
In this phase workers are important for irrigating food bonusses to increase your food per turn, to mine grasslands and increase production so that your towns can increase their food per turn by building settlers and granaries where those are better than settlers, and to build some roads to get the settlers to their destination as fast as possible. You should not yet have enough workers to have every tile improved.
That is for the first 8 or so cities. After that, you want to increase your investment in workers and you probably need to start preparing a millitary by turning your most productive cities into unit production. While you do this with your most productive cities though, you should still keep building settlers with your other towns until there is no more space to build cities. When there is no more space to build, there is only space to conquer so units are gonna be the new priority. (and growing the population in your existing cities)
Exception is a 20k victory game. In this case you need select one of your first 2 towns to become the 20k city and have that town produce everything that makes culture. The rest of your empire works pretty much as described except that they should probably build some extra workers that you can join into your 20k city.