In previous Mainstream Pokemon Games, players could level up Pokemon by using Rare Candy they obtained during their journey. Now, within Pokemon Sword & Shield, players can also obtain the newest item called EXP Candy. These type of Candy raise a Pokemon's EXP by the given value of the Candy. Depending on how much EXP Value a Candy like this has, which depends solely on the size of the Candy, a Pokemon's Level could also raise. There's even the chance a Pokemon could raise multiple levels if the value of the EXP Candy is great enough!
EXP Candy can only be obtained from winning Max Raid Battles. The higher the Max Raid Battle Level, the bigger the EXP Candy you will receive. On top of this, you can even obtain Dynamax Candy from being successful at defeating Max Raid Battles. Dynamax Candy effectively raises the Dynamax Level of a Pokemon, basically giving them all the more Hit Points when they are Dynamaxed when in battle. A Pokemon can be given a maximum of up to ten Dynamax Candy.
We have questions and answers related to this topic which may also help you: