I want to loop through Woocommerce Product Catogories and show them in dropdown

wp_dropdown_categories() does exactly that. Don’t let the name confuse you, it is not just meant for the built-in taxonomy category. Simply set the taxonomy parameter to the value of your custom taxonomy. Also work through the list of parameters and set as necessary.

Just a small note on your code, avoid passing just term IDs to get_term_link(), it makes the function expensive as it needs to query the db to get the term object. You already have the term object, so simply pass the complete object to get_term_link().