Read Woocommerce search custom attributes for more information.
WooCommerce product attributes are actually stored as custom fields (post meta) and terms, therefore it’s possible to search them very easily.
This live filter displays the terms of a product attribute. The customer can click a term and the shop page will show products that are related to it.
Use the plugin WP fastest site search from the plugin store. Follow the installation steps and activate the plugin.
The plugin comes with an intuitive dashboard where you can set up the search behavior without coding. Here you can configure the search bar to pick up custom attributes and set up how to display them.