Please try it on ur own risk!
First download the u2 firmware:
SM-A217F VBMETA [A217FXXU2ATG5].zip
Second Magisk 8.0.2.tar.gz
Releases · topjohnwu/Magisk
Copy the AP part firmware and magisk to your SD card
Install Magisk and update it
Open Magisk, press install and select AP file that u copied to the SD card.
After patch completed, go to the the installation directory and copy the patched file to the pc
Make sure that OEM:OFF RMM:OFF KG:OFF and open Odin
Select in AP magisk_patched( the file copied from the phone) and the other parts(BL,CP,CSC) from the downloaded firmware
Unselect all and flash!
-Put phone in recovery mode
-wipe data/factory reset
- Restart phone
-Enable OEM
PS: If u cannot see OEM option please check youtube on how to enable it!
Root done