Weight gain 😥

I'm only 23 weeks and I've already gained 24ibs. I don't know what to do I'm already over weight. This is my 4th pregnancy and I've never gained this much weight with the others. Is it possible to go on a successful weight loss diet while pregnantÂ