Years ago when I was struggling to figure out what to do with my vocal space, I needed to convince myself that the problem really was comb filtering from windows and walls too close by. (As opposed to the need to buy a more expensive microphone!)
As an experiment, I pulled my heaviest winter overcoat from the closet and threw it over both my head and the microphone and recorded a test. It was awkward but I was amazed at how effectively the yuckiest components of the sound vanished. That was all the convincing I needed, and I was able to confidently commit to a strategy of 360-degree absorption that did indeed prove to be the solution. (Emphasis on "360".)
There are several problems with the foam-lined box approach. The first is that you're applying absorption in the wrong place - behind the microphone, in a cardioid microphone's dead zone. Second, the type, thickness and density of the foam or batting is inadequate to absorb
any of the most significant frequencies. Third, there will be new resonances within the box itself that exacerbate the problem even more. The box will also not have enough mass to avoid vibrations conducted through it, whether laid upon a desk or mounted to a stand.
In order to be effective, you have to absorb as much reflected sound as possible, from all directions. That means placing absorption behind the singer, not behind the microphone. Even more significant is the ceiling, which will be the closest boundary in most rooms for a standing singer. If the singer is 6 feet tall and the ceiling is 8 feet high, there will be a resonance at the 2-foot wavelength - about 500 Hz, smack in the middle of the most-significant harmonics for a male vocalist. And, of course, repeated at every 500 Hz interval all the way up the audio spectrum.
A makeshift vocal booth is still do-able on the cheap. Perhaps not for $23, but certainly for a couple hundred dollars. Use at least 3 inches of rigid fiberglass (4" is better) and set it up as far as possible from walls and windows. Put extra thickness between you and the nearest wall. You can do this using free-standing panels, so it's possible even for those living in rented apartments.