Sound insulation comprises three major elements…
These three interplay in a highly complex way.
[This is hugely over-simplified because it's an entire university degree all to itself]
You can't really add mass or even practical damping or air-gapping to windows unless you add more panes - double or triple glazing. Both of these add not only mass but also rather spectacular air-gapping. Leaving a gap between two surfaces means that the transmission of sound between them is lessened as some of the air 'absorbs' the sound.
Double-glazing improves this by actually removing a lot of the air between the panes, thereby reducing the remaining air's ability to transmit at all.
DIY 'fake' double glazing that you stick up inside existing single pane will help a bit with heat retention in winter, but not to any significant degree for noise transmission.
Adding a bit of weather-seal strip round a single-glazed window will reduce marginally the sound that manages to squeeze through the gap. Practically it will only affect the high-end, the 'treble'. I would imagine your issue is more 'bassy' than that.
If you're next to a busy road, double-glazing will reduce the transmission to more bearable levels, but even triple-glazing will not silence it. For that you need mass. The walls themselves will vibrate in resonance to traffic noise. To reduce that noticeably would require literally another wall, air-gapped & mechanically separated from the first.
Egg-boxes, foam or 'sound insulation' you get from a DIY store will not impact this to any degree comparable to the cost. As the other answer mentions, blocking foam up against the panes will damp their resonance, but not to any great degree.