Firstly, you need to get the boot image from your phone. There are many ways to get this task done.
For example, backup your boot partition, or get the boot.img file from the firmware of your phone
Important note: If you are getting image from the firmware,
the version of firmware installed on your phone has to match the version of the boot image.
If you are getting rebooted to Android Recovery (or Custom recovery)
after flashing the image you got here, Format Data (As in TWRP) or factory reset (as in stock android recoveries).