That is what happens when you flash TWRP and then don't install a root utility like Magisk in the same session.
I had the same problem and got out of it using the instructions here:
Sorry, I can't post links since I'm a 'new' user (low posts, but registered over 1 year ago.)
https reddit dot...