Comment by michaelt
If you literally want to emboss hello world on a piece of foam, you can buy cheap CNC kits on Amazon like https://www.amazon.com/dp/B08HRLGL6C/ which will execute G-code.
They're weak and imprecise by the standards of CNC machines but if you're only looking to learn a bit and cut foam? That's a low price.