“at the beginning, I apologize for mistakes in the English language, I use a translator.”
Sure, no problem 🙂
“the website and joomla4 backend disappeared.”
Did you change the file to use Joomla url rewriting ?
“After going back to htaccess.txt it works again. What could be causing this?”
Are you using an apache web server ? If so, please check and enable mod_rewrite. You can ask your hosting about this case. See https://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server