How the XP system works and how to XP fast
You max your hero's attributes quickly, usually by level 80 to 100. XP is earned in any match, and the units you bring gain XP too. If all your units are max level, the XP is stored in a shared pool in your Units-Menu to level other units later. It is heavily recommended to play a fully leveled warband and level new units from that Stored XP.
The fastest leveling is Bandit Raids until you hit the weekly XP cap. These PvE matches take about 5 minutes and give the most XP, so stack XP bonuses before running them. The limit is now a cap on XP earned per week, not on how many battles you can run, so once you have maxed it out sieges are your next best option.
In a Bandit Raid you and four others clear bots, groups are marked with an exclamation point. Around 80 kills gives roughly 90% of the XP, though you still want 100+ unit kills to score A+ and clear the weekly bandit-raid quests. High damage T4 cavalry (Companion Cavalry, Kriegsbruder, Prefecture Cavalry) turn each raid into a sub two minute speedrun.
Use XP boosts during raids, especially at the start of a season for runes. The O-menu “fulfill daily/weekly quests” option lets you spend bronze for a portion of missed rewards, useful for fast XP. This is mainly worth it for new players leveling for stats, or for runes (unlocked at seasonal level 50). Beyond that you are just wasting bronze, extra account levels give no further benefit.

