I just want to know if there would be any special modifications in order to make it work?
If your bike has a 7 speed freewheel then no you can’t put a 1x12 system on the bike without changing the rear wheel and even then maybe no.
At a general level it depends on whether your rear wheel has or can be retrofitted with a Micro Spline freehub.
You'd need a 135mm Microspline rear hub (e.g Shimano FH-MT401) and that hub with cassette would need to fit in your frame which is not guaranteed.
All the Shimano 1x12 systems need a Micro Spline freehub to fit the 10 tooth gear.
If you’re stuck with an HG freehub you can still use the 11 speed 11-51 Deore CS-M5100 cassette.