I followed those steps. Right after unlocking my bootloader and installing TWRP, I formatted my phone, flashed oxygen OS on both a and b partitions, as mentioned in the flashing guide. After that I flashed dotOS and flashed TWRP again. When I tried booting my my phone, I booted into TWRP again and again. When I tried to flash dotOS again, my storage was encrypted.
Finally, I wiped my data, formatted the phone from TWRP and flashed dotOS and TWRP. My phone finally booted up into dotOS.