Samsung phones bootloader unlock
Under developer option, Enable OEM unlock.
First find custom rom as per your mobile model. Connect mobile to computer having developer kit. Root the mobile and flash rom.