Hi these UsmanMo - The NHS recommends taking Vitamin B12 tablets between meals:
https://www.nhs.uk/conditions/vitamin-b12-or-folate-deficiency-anaemia/treatment/#:~:text=If your vitamin B12 deficiency,of hydroxocobalamin twice a year.
Whereas Metformin is recommended with food, so it would seem sensible not to take them together.
What does the packaging on your medication say? Is your B12 prescribed or a supplement you bought?
If you are to be taking B12 for a while, it is worth finding out if your supplement includes B7 - Biotin. The reason I suggest that is Biotin can interfere with some test results. I posted a thread on this about a year ago (how time flies!), here:
https://www.diabetes.co.uk/forum/threads/biotin-alert-–-potential-assay-interference.167972/
Of course, it may not be an issue for you, but bearing in mind the challenges you have facted, you don't need any spanners in the works.
If your supplements do contain biotin, it's not an issue. It just means a bit of additional preparation before blood tests.