To set default attributes manually, first, in the WooCommerce dashboard go to Products and then click on your variable product.
Then, select Variable product from the Product data dropdown.
After that, under Variations, you have to select the Default Form Values. Those are the attributes that will be selected by default for that product
Screenshot for clarification: https://ibb.co/8z2SQVz
This option is only working on a single product page but not on the Archive pages.
Sorry to say this option is working on a single product page but not on the Archive pages. You can check it with the Storefront theme. Storefront is a free theme developed by WooСommerce.