Termux closes window immediately on Android 10 and 11
This is a problem that came with version 0.105 of Termux and should be gone with 0.106.
In the meantime this workaround helped me to solve the problem with Android 10 and 11.
Basically it involves the following steps:

Install Termux
Get access to the home directory inside Termux (for instance with a file manager)
Create the directory /home/.termux
Place an empty file named termux.properties inside of /home/.termux/
Start termux