Light therapy will reduce melatonin in the morning and that way it helps mood and sleep rhythm. Methylcobalamin will help with this too. If you only take Melatonin, and you take enough, it will help you fall asleep, but can often lead to too much melatonin hanging around during the day, making you depressed and tired. If your brain doesn't get the clear signal that it's morning, then your rhythm will still be messed up, even if you get to sleep on time. Methylcobalamin will help sensitize your eyes/brain to sunlight and help further reduce melatonin during the day, and maybe help in other ways. All three is the best: light therapy (and avoiding evening and night light), methylcobalamin, and melatonin.
I use all three. For me, if I could only pick one thing, it would be light therapy. I used to think melatonin didn't work for me, but I have found that a higher dose is effective at making me sleepy - it just turned out to be a much higher dose than I thought anyone would need. But, without light therapy, I'm still messed up. With light therapy, I could work 3rd shift no problem. I can have any sleep schedule I want, as long as I can have 8 hours sleep, and can sit in front of my light for 30-60 min first thing in the morning. I struggled with sleep for a long time.
As Aconita mentioned, Vitamin D might help too. Exercise too. Many different vitamin and mineral deficiencies, hormone dysregulation, sleep apnea, too much caffeine, and all sorts of other things can also contribute to insomnia. Really, everything good for health is probably good for sleep too, and everything bad for health is bad for sleep. Like everything, because everything is connected. Keep casting a wider net until you figure it out.