Optimize WP search query term

I made the following filter to remove s from terms shirts or hoodies, however I don’t think it’s the way it should be. Any ideas if I can make it in a more proper way?

Also, is there any way to include a clause in the above function when someone type tshirt to show results for t-shirt and same for tshirts to show results for t-shirt?

Basically my idea is the following:
All of these terms (t-shirts,shirt,shirts,tshirt,tshirts) to display results for term t-shirt.
And hoodies to simply display results for hoodie in singular form.
Thank you!