How to lose weight?

I need to lose weight. It’s really putting a damper on my self esteem & self confidence. I have had 2 kids & was still skinny when I was pregnant (I would be like 7 months pregnant & you could barely tell). I was put on a medication years ago & that’s what started the weight gain. I’m the biggest I have ever been. I have health problems & can’t exercise. I have tried fasting but I’m borderline diabetic & would get sick whenever I did it. Any suggestions for me?