The answers at Proportion of explained variance in a mixed-effects model cite many sources which should give you abundant technical information on this question. I’ll add a few points for context.
First, many have struggled with this question. Commonly cited sources such as the textbooks by Singer & Willett and by Fitzmaurice, Laird & Ware emphasize that with mixed models (aka random coefficient models, hierarchical linear models, multilevel models, etc.) there is no neat analog to the R-squared (RSQ) of ordinary-least-squares regression. There are ways to approximate explained variance -- to estimate pseudo-RSQ -- but you may find these methods unsatisfactory. Each may produce results on a different scale, such that for a single model you may obtain figures as divergent as .05, .15, and .75 depending on the method. Moreover, these approaches have not been met with any widespread endorsement.
That said, if you compare a given method’s results across models, rather than comparing a given model’s results across methods, you may find these statistics useful. Three of them are
• McFadden’s pseudo-RSQ: McFadden's Pseudo-$R^2$ Interpretation
• The generic pseudo-RSQ computed by squaring the correlation between predicted and observed values. Alternatively, one may track the extent to which a given model reduces (1 - pseudo-RSQ) from a prior model.
• The fraction of level-2 variance (e.g., between-person as opposed to within-person variance) explained by the level-2 predictors.