It's been a nightmare for a friend they had a bay window with damp. They decided on cavity insulation. The damp got worse and spread. They had the firm back twice. No improvement. DH knows a bit about cavity insulation having had a friend who remedies these issues so sent him round. OH joy the cavity was full of rubble etc and the path was above the recommended height for a property of that age.
They had to accrow prop the bay remove the plasterwork etc, dig out the insulation and rubble and make good. It helped enormously.
Unfortunately the owner refused to dig up the concrete path around the frontage which was part of the issue so they still have a bit of damp.
As for expanding foam around windows. That's the devils work.