Christian Mühlbauer: Depends. Are these products gone forever and there`s no succesor product ? Thats just normal as John Mueller said and you can leave the 404.
Is there a follow-up or similiar product? 301 Redirect.
Check if the product urls have relevant backlinks. If so, try to make a relevant 301.
Travis Bailey: Some of them might even be from a defunct scraper site. That happens too.
Ronnie Lawson-Jones: I wish people didn’t just jump in and 301 absolutely everything! No need! 404s are normal, 301 pages with rankings and links first
David Harry: Yea, Christian and Ronnie have it... if it`s an important page (defunct product, page with external links, page with traffic) then most certainly I would consider hitting the htaccess. But, if they`re just dead pages of no value, there`s no point in bloating the htaccess with redirects