Wildcard redirects for paths in Google Domains

The Goal: redirect www.example.com/product/* to www.example.com/product using Google Domains

Background: I’m using github pages to host my site so I cannot add an htaccess file like a more traditional site. Also I had some issues with emails from my domain going to spam when I used Cloudflare.

There doesn’t seem to be an option to simply set up wildcard redirects for paths. it’s just subdomain.