Need help with rooting and installing LineageOS. Have done this before on Nexus 5, but today something went wrong with HTC M8 and now it's stuck on boot screen I can get into bootloader using Power and volume keys, but any other options as Recovery, Factory reset brings me to just boot screen
Are you sure you are on the latest compatible baseband of your phone? Sometimes the newer builds of TWRP won't boot on old firmwares. Try updating that first.
And since you have access to your bootloader, you can install recovery and start over with a different ROM (make sure to verify your checksums manually).