Yeah, after the OTA update to android 10, my S9 also encrypted itself without asking. So now twrp asks the password, which no one knows (and reinstalling with no passcodes on the phone whatsoever does not work, I have tried that also).
You can skip the password by pressing cancel and try if twrp works on your S9.
Twrp is basicly useless now with my S9. You cant make any backups, you cant do factory reset, at least not on my S9. Fingers crossed for waiting new updates, if twrp works with those…
I have ask this before in this forum, but no one does not know, why the update to Q did this encryption automaticly.