Just put one of these rules at the top of your .htaccess file. Pick your favorite.
You might need to add in the forward slash after newdomain.com depending on your setup.
RewriteRule ^(.*) https://newdomain.com$1 [R=301,L]
RewriteRule ^ https://newdomain.com%{REQUEST_URI} [R=301,L]
RedirectMatch 301 ^(.*) https://newdomain.com$1
If you still want access to something (say adminer so you can check on the old database and to last minute stuff) use a RewriteRule method and specify conditions that exclude those resources like so:
RewriteCond %{REQUEST_URI} !^/adminer.php
RewriteRule ^ https://newdomain.com%{REQUEST_URI} [R=301,L]