It depends and is likely a combination of factors, decreasing Elo and also making tweaks to try to more closely match a certain players style.
In general, it's difficult to limit an engine's Elo in a natural way, although with some work something decent can often be achieved. Common apporches to nerfing an engine strength involve having is choose a random or maybe the second best move every once in a while, limiting the amount of nodes it's allowed to search, or making the piece values more "rough," where certain pieces are under or overvalued.
As far as "personality" goes, it can often be just as difficult, if not more so, to try to capture precisely, but progress can be made.
For example, if one were trying to create an engine with the playing style of Mikhail Tal, one tweak they might make is to crank up the importance of king safety in their static evaluation. This way, the engine would be more likely to sacrifice material for an attack on the king, even if it's not necessarily sound, to moreso mimick Tal's well known attacking style. Of course this needs tuning, like any personality feature added, since their wouldn't be much point in having an engine that stupidly sacrifices material for a completely unsound attack. Or maybe in the case of Carlsen, the engine developer would try to put particular emphasis on making sure the engine has very strong endgame play that tries to induce weakness, mimicking Carlsen's often robotic-seeming endgame play.
As you also mentioned, in recent years neural networks are changing the way engine developers might try to mimick a certain player in the future. But as you also rightly recognized, one big hurdle right now is that a neural network generally needs large amounts of data to be trained well, more data than is often possible from a single player.
As you can probably see, this sort of thing isn't really an exact science and it requires some creativity and careful design to make a "Magnus Carlsen" engine or "Gary Kasparov" engine.