Check your device model number.
Make sure your device battery is charged above 50%
Backup your current files and data- Full Data Loss Process (save them on external storage).
Download and install the Samsung USB driver to your computer system.
Also, download the ODIN software. Select the above Oreo version in the ODIN list. Install ODIN on your PC.
In my opinion, you don’t need rooting for your Samsung Galaxy A51. If you thought you could Improve Performance By Root; With the Exynos 9611 processor and 4-6 GB RAM, your device can perform well. If you don’t know how much RAM you need, You will never use this much RAM. You should not Boot into Normal OS Booting, by pressing the power button, after firmware flash. It will boot you to a Non-Rooted environment. If you accidentally urged and boot frequently, Don’t panic, after setup everything, switch off your device and boot into Rooted OS using above mentioned keys. If you root your device, because of the battery drain issues, you can optimize your battery without root. Beyond this, if your purpose is to Disable Bloatware apps, you can do that without using this method. When you have any suggestions or doubts, comment below.