If you complete a whole heap of Kingdom tasks and collect them, you get all that XP!
Then you can upgrade your Kingdom as long as you have both enough XP and you meet the Global population requirement (which is clearer when the text isn’t broken - but should now be fixed).
If you have enough XP but not enough population, the screen will show you the level you have reached with the XP you have banked up, and then shows you how much global population you still need.
You then need to upgrade other Kingdoms to increase your global population.