I experimented with cutting foams of various densities. I purchased a specialized foam endmill from Datron that works very well, but there may be less expensive alternatives (many people have success with non-specialized endmills). I found videos from Winston Moy (Carbide 3D) and John Grimsmo (Grimsmo Knives) informative. High RPMs, high feed rates, creative climb/conventional toolpath combinations, and air blast were all part of successful results.
By the way if like me, you are fitting your foam inside a box or drawer, I have found a great way to cut it. I used to try cutting out the final form with the cnc but it is slower than my new method for cutting out a straight sided outer profile. I use a band saw it is fast and accurate. Then I put that blank in a fixture like this, with double sided tape. And do the interior configuring and then remove the now carved insert. The double-sided tape will come with it, and place the insert in the draw or box. Now the tape does double duty. holding the insert inside the drawer or box. Here are the photos. Yes, I am using spare t track as my fixture, as it already has holes for mounting to the table and perfect screws built for it. Though you may have to drill a few more for your particular application. hope this helps someone. I know it helped me but then i do a hundred of these foam inserts at a time. So not a common thing to do. here are the pictures to show how it is done.
believe it or not Amazon. I have also bought from temu but as you can guess it was not very good quality from temu. price is only one factor in any purchase quality matters.