I’m happy you sorted the keyboard "issue:
That’s probably because you upgraded from the S build to the Q build without formatting the data partition. See this post for details of how to do that.
Formatting will lose all you user-installed apps and user data, so if you don’t have an accessible backup from your Q installation, you can try re-installing the Q build without wiping or formatting, abd taking a backup of your apps and settings using Android Backup and Restore Tools project as described in point 2 of this post.
Then, in TWRP, format the data partition, re-install the S build, and restore your backed up apps and data.
Good luck.
As mentioned in other posts, it’s always a good idea to have an up-to-date backup of your apps and data. It’s handy “just in case” when updating from one /e/OS version to another (i.e. 1.11-q to 1.12-q), but it is essential when upgrading (i.e from Android 10 to 11 or 12)
EDIT:
If you did that then you may have blown your chances of not losing your apps and data. Those commands appear to be trying to format various partitions on your device storage. I’ve no idea what the effect of that will be. Anyway, formatting the data partition using TWRP and installing an /e/OS build should at least give you a working device