Redirect in .htaccess for only one site

I need to make a redirect from http to https with www and without www, but only for one site, (CMS Netcat has only one .htaccess for all sites in the system) This works absolutely fine

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

But it gives the result to all the sites in my directory, the question arose: how to clarify in this redirect that this rule is needed only for www.test.com?