Sell them on a marketplace like Facebook/ebay/etc. Or trash depends on the quality they are in.
I can relate to this.
When I first got my iPhone SE, I obviously ended up collecting the most cases.
I had like 45-50 cases, many name brand ones.
When it was time for me to upgrade to the iPhone 7, I decided to dispose of the old cases. I put the ones that were damaged or broken in the trash, and I sold the ones that I never used or lightly used, or that were still in good condition, at a garage sale, donated to a charity shop, or gave them away to a friend who still had an iPhone SE.
I had a lot of H&M cases for the iPhone SE space grey, but after I got the iPhone 7, I gave those old cases away to an old friend at my school who still had a rose gold SE. She liked them.
The last three iPhones up to my current 15 pro I kept the collection small and I only get a case of one of them break or yellow out, or if there’s a sale on them. Only kept like 6 cases for my 15 pro, and the least was 2 with the iPhone XR (only had it for a year while waiting for the 15 pro to drop in price)