1. Get older Samsung Firmware from SamFw etc. for your device. Android 12/11 is okay
2. Download TWRP for your version - could be found in the A51 Telegram Group
3. Download XRom also from the Telegram Group. Use XRom because it unlocks some extra features
4. Download latest Grasskernel
4. Boot to TWRP
5. Wipe everything, cache, dalvik etc
6. reboot to TWRP
7. Dowload Magisk
8. Install Xrom with the zip in TWRP
9. Install GrassKernel
10. Install Magisk
11. go to settings in twrp choose terminal
12 now write "multidisabler --all"
13. reboot
14 if it dont reboot installl dm verfiy decrypt or so - can also be found in telegram