[OnePlus 3T Questions & Answers] redpoint73:
What is in the TWRP folder, anything? The TWRP folder would normally only be created, if a backup was created. You can possibly just boot TWRP, select the RESTORE option, select the backup from the TWRP folder, and get the phone up and running again.

Another possibility, if you aren't that up on adb commands (sideload, etc.), since you can access the internal storage, just download a ROM or fill stock ROM zip onto your PC, then just drag/copy to internal storage. Then boot TWRP, select INSTALL, pick the file, and flash it.

What is the background of the device, how do you not know the OS version? Did you receive it this way, or fixing it for a friend or something?

---------- Post added at 09:19 AM ---------- Previous post was at 09:12 AM ----------

That isn't the dm-verity notification. The dm-verity notification screen is similar, but says "dm-verity is not started in enforcing mode".

What you described is the bootloader unlocked warning screen. The bootloader unlocked warning screen is expected and normal (in fact, unavoidable) if the bootloader is unlocked. And unlocked bootloader is required for TWRP, flashing custom ROMs, etc.

dm-verity warning screen is in fact normal, as well, if you have TWRP installed. That one can be disabled by a couple different methods. But it's only purpose is to notify a "average" user that the system has been modified. For XDA users that are intentionally modifying their phones (TWRP, root, etc.) the warning is pretty meaningless. Under certain conditions, dm-verity will prevent the phone from booting. But TWRP and root in themselves, will normally not do that.

Neither warning means you have the wrong kernel, necessarily. And unless you (or someone else) tried to flash a kernel, there really isn't any reason to believe that.

---------- Post added at 09:29 AM ---------- Previous post was at 09:19 AM ----------

Flashing stock recovery will (by definition) replace TWRP with stock recovery. You probably have recovery, just the stock one (not TWRP) which is fairly useless in your case (can't flash custom ROMs, root, etc.).

Can't really troubleshoot this, unless you tell us what file exactly (file name) and where you got it from. "Stock ROM" is far too vague, and can literally mean a dozen or more different things.

Also, what version TWRP?

Using a TWRP version which does not support Oreo is one reason for Error 7. Or you may have tried a file intended for the 3, not the 3T. So these details need to be provided, before we can figure out what went wrong.

You kind of need to decide which of those you want. Otherwise, there are just too many options for us to give.

Yet another option (in addition to those given) would be to flash the full stock OOS zip from here: https://xdaforums.com/oneplus-3t/how-to/official-oxygenos-5-0-1-android-8-0-t3728119

Then before rebooting, flash Magisk to root, and you should be all set. The full zip will put you on a fully stock baseline (including firmware). Which, if you aren't sure if you want stock, beta or custom ROM, is not a bad place to be; you can see what the "stock" condition is, before messing with things like custom ROMs. But again, it's totally subjective and a matter of personal preference, and you really do need to decide for yourself what is best for you (as an individual) at this time.