Riboflavin or coq10 is better for migraines? Side effects? And I read they can cause weight loss, is that true?

Riboflavin. I have not heard riboflavin or coq10 causing weight loss. Both are effective, but need to be taken for months before you see benefit. Riboflavin can turn your urine orange color.
B2 or CoQ10. There have never been any studies putting b2 and coq10 head-to-head, so we don't know the answer to your question. I have developed a "head formula" product with several other physicians and it has both ingredients in the formula, because both have shown promise. Some have talked about both of these helping people to lose weight, but I have never seen any studies showing this. Look at holisticpain.
Both can work. Believe that coq-10 is more successful, but far more expensive, and you would likely need 300-400 mg twice daily.. Riboflavin a very cheap choice, but here you likely would need, 150-200 mg twice daily. Not so sure either really "causes" weight loss, but both generally non-toxic and safe, and perhaps, in presence of your medical issues, pretty good choices. Hope it works out.