All game modes in MXGP 2020 give exactly the same XP. In all modes you will earn 30,000xp for the win, 10,000xp for the holeshot & 20,000xp for no rewind. Difficulty, assists & race length have no impact on the amount of XP earned so feel free to make it as easy and as short as you like (the shortest race is 3 minutes +2 laps).
The most efficient way to earn XP in MXGP 2020 is to create a custom championship as you also get XP for wining it. Winning a four race custom championship will give you an additional 60,000xp.
For efficiency I would recommend not playing the career at all as each Grand Prix consists of two races. Instead, create a custom championship (minimum of 4 races) making sure you pick-off all of the "Win a Grand Prix at track name in any game mode" achievements. Once you have all of these achievements you can create a custom championship using the very short custom track (10 seconds per lap) called "FAST CASH XP" created by ItchyFawn433243. Be sure to get the holeshot and avoid using rewind if possible for maximum XP.
Race settings for custom championship or quick mode GP:
Race Sessions: Only Race
Race Length: Quick (3 minutes +2 laps)
The total amount of XP needed for Prestige level 100 is 10,400,000 (credit to Knight Maximus for this info). Winning a 4 race championship with all bonuses will earn you 300,000xp. This equates to 35x 4 race championships (140 races).