install twrp, go into recovery modus twrp, wipe data and format data as well. restart in twrp again to update the internal storage, connect to pc, transfer the new rom and install normally
as simple as that as long you wipe and format, be aware that wipe and format are two diferent things