Moving wordpress to different url/server creates redirect loop

As WordPress documentation says about .htaccess file:

WordPress uses this file to manipulate how Apache serves files from
its root directory, and subdirectories thereof. Most notably, WP
modifies this file to be able to handle pretty permalinks.

And a basic .htaccess file content will looks like this:

# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

If that .htaccess that you says is inside your WordPress directory, you can rename it, and try to access you WP admin panel, go to your permalinks settings dashboard, hit without any change Save changes button at the bottom of that page, to regenerate a new .htaccess file on you installation directory automatically, with your current rewrite files rules, that matches with your website configuration.

Make sure to take a backup of your previous website installation if you made some changes to that file in the past, and copy the rules in the new generated files to preserve your old changes.