You should aim to upgrade all your buildings before you upgrade your castle, as it is the centralized building and serves as a measuring tool of your progress. So upgrading your castle will put you up against stronger opponents, and you will have a tough time against them if you don't max out at the previous level first. As at the start you can store only very low amounts of gold and food, all the resources you win in a battle that will make you pass your upper level will be lost. So make sure to spend adequate amount of resources so none of your war spoils go to waste. Save the gems until you get 1,500 of them, which is enough for a second builder, and being able to work on two buildings at the same time is a major advantage, and you can't buy him with coins. Focus on food early on as it is needed for troop training, and you'll be doing that a lot in the beginning, so always go for food producing tiles when raiding or capturing lands. Also, build the farms first and upgrade them as soon as possible. Playing the campaign can be highly beneficial to your strength in PvP battles as you get gems from it, and also unlock new spells and Titans. As soon as you get the option to join an alliance you should do it as you can ask for reinforcements from your new allies, and don't be overly picky at first.