i have twrp and wiped off all the data. i dont have any backup.
What exactly were you trying to accomplish? You did more than wipe data, you wiped system. Were you trying to install something (custom ROM, root) or solve some problem?
You should not be doing
anything in TWRP, without first making a TWRP backup of the current ROM. That is best practice, which I am always baffled and disappointed, that folks do not follow.
There is a collection of stock TWRP backups, sticky at the top of this Q&A forum:
https://forum.xda-developers.com/htc-one-m8/help/tutorial-how-to-stock-stock-twrp-t3086860
So one method to get back to stock, is find the correct stock TWRP backup, download, and restore it using the instructions on the thread above.
I found a zip file one internet which I am suppose to put on sd card and update stock firmware form hboot. DO i need to get back stock revcovery first or there is no need>
That is much too vague to be able to answer properly. "A zip file you found on the internet" doesn't really tell us much. What is the name of the file? Where did you get it from? You can post a link by obfuscating the URL with a couple extra characters, since don't have enough forum posts to post a link.
We also need to know more info about your phone. If you know how, do fastboot getvar all, and post the results (delete IMEI and serial number before posting). Or alternately, tell us what it says for OS number, hboot number, and radio number, on the phone's bootloader screen. Also, whether the device is s-on or s-off.
Even if the zip file is a valid RUU, it needs to match the CID/MID of the phone. You can't just flash any RUU.