Can't root with Magisk on my SM-A525M (A52 4G)

I’m trying to install magisk on my phone with /e/ os but Odin fails to flash the patched file.
What I did:

1- Installed latest Magisk apk
2- Copied boot img from the E OS version I installed into my phone
3- Patched the file using Magisk’s app
4- Copied that patched file into a windows pc
5- Turned that patched img into a .tar
6- Tried to flash it as “AP” using Odin

Please help me I don’t know what I’m doing wrong.

Hello @contre98,Welcome to the /e/ users forum.

You could have a try using TWRP to flash the patched img