Getting the .htaccess code wrong can break your site completely. You may not be able to login to your site.
If this happens you need to access your site file through your hosting file manager e.g. cPanel.
Login to your hosting management console and go to the root folder of your website. You may need to click the check-box to “show hidden files” before you will see the .htaccess file (it’s often turned off by default on shared hosting accounts).
Download a copy of the .htaccess file (so you can find any redirects and IP deny rules you may have set) OR just rename it to something like htaccessOLD.txt
You should now be able to login to your site.
Go to WordPress Permalinks and rest your permalink settings – WordPress will generate a new default .htaccess file when you save the permalink settings.
Here’s more info about WordPress htaccess files https://tech.graphicline.co.za/build-wordpress/chapter-2-admin-secure/wordpress-htaccess-file/#fixhtaccess and shows how to un-hide hidden files in cPanel file manager