How can I make the slug of the taxonomy also the slug of the custom post

Perhaps a simple way would be to create a custom taxonomy template file which would need to be named taxonomy-$taxonomy.php (where $taxonomy is the name of your custom taxonomy/category)…..see this page for more info, and if you scroll down there is a chart that shows how WP uses template files, click on it for a larger image):

https://developer.wordpress.org/themes/basics/template-hierarchy/

You could theoretically also create a custom template file that is for each $term in your custom taxonomy, but that isn’t necessary if you don’t want to segment your product listings by each category term in your custom category.

THEN you could also use a 301 or 302 redirect statement in your .htaccess file to send any URL requests for aaa.com/product/product1/ (/product/%postname%/) to go to aaa.com/category1/product1/ (/%custom_taxonomy%/%postname%/)

OR simpler still, not bother with a redirect as long as you don’t include any links/menu links to the wrong URL but be sure you have links/menu links to your preferred URL easily accessible. If you find that site traffic is still somehow ending up at the wrong URL then do a redirect to deal with it.