If the device gets stuck on the logo, go back to TWRP and perform a "Factory Reset."
Look for a Nougat-based ROM on the XDA Developers forum for your specific device.
This usually means you flashed a ROM meant for a different model variant. Reflash the correct version immediately.