the optimal buildup seems to be the following:
1. most cheapest culture building or something else to let the city slowly reach 1st culture level.
2. maximize food & production. which first depends on the city: food increases population and adds further worked tiles which increase your base

. production increases

directly. choose the path that maximizes

fastest (and for small towns that can expect caravan support thats always food)
3. commerce. now that your city builds everything quite fast this is next on the list - ensures your empire prosperity. focus on commerce in general first. science and gold later.
4. culture & happiness if needed (to prevent revolutions, expand borders to valuable resources, unhappiness...)
5. caravans. to ensure smaller cities in your empire develop quickly
6. missionaries: cloisters give a science bonus
7. espionage. helps if you have well trained spies.
8. health - but only if really needed.
9. defense... can't hurt.
10. military buildings... it there's just nothing else to build. except it's the city where you settle all your great generals. in that case this comes at number 3.
(11. military units. but only in your main military city. then this comes directly after military buildings at position 4)