I get no period

amber

So I’m quite overweight and hardly have any periods. Like I can go like 6 months without one or longer. I tried metformin and it kinda helped I’d get it for a month or two then not the 3rd. What has anyone done to get their period going and regular. We have been trying for like 3 years and getting frustrated. Starting to think I need to just lose the weight or go on a fertility diet or something. Any advice?