The regulator Ofgem says the price cap will increase by 4% in October for millions of households.