pixel_player96616553 Here is a list showing all possible town hall upgrades:
https://dynortice.xyz/seaport/#!/building/1
The first column labelled "Lvl" will show you the regular level you can upgrade the building just for materials, the second one the level on which you can upgrade with gems. Usually there is no good reason to ever upgrade a building with gems. It is just earning something extra from players who don't have patience. Usually the building upgrades get available perfectly in time to unlock something new at the point you really need it in game and gems better should be saved for buying very good ships.
I wouldn't even trying crazy things to level up quicker just to get a building upgrade unlocked. Take your time, prepare, collect even more materials, be able to do all the upgrades the town hall will unlock right after becoming available. And never underestimate, having your fleet fully upgraded is usually more important than having all buildings up to date. Your buildings will not earn you the materials for future upgrades (except some fish), but your fleet will.