Welcome to the forum, it is full of good advice and people willing to answer your questions.
A bit more about your diagnosis will help people do just that. What your HbA1C is important to know as that indicates how far you are into the diabetic zone and how much work you will need to do; this will be a number above 47mmol/mol and represents the average blood glucose over the previous 3 months.
As you have been prescribed metformin, I assume it is quite high but I hope you have been advised to build up your dose slowly and to take with food usually the main meal in the day.
However changes to your diet are equally important as is losing weight if you need to. Many find a low carbohydrate approach successful in both losing weight and reducing blood glucose. Low carb is less than 130g total carb not just sugar per day but it does not mean NO carbs, you just have to learn what your body cn tolerate and everybody is different so the is not one size fits all, sadly.
This link may help you see your way to finding those dietary changes, it is a low carb approach based on REAL food.
https://lowcarbfreshwell.co.uk/
Keeping a food diary of everything you eat and drink with an estimate of the total carb will help you see where savings can be made. Info can be found on food packets or searching for FOOD X and total carbs often given as per 100g so a bit of calculation needed for the portion you are going to have.
The book or app Carbs and Cals is very useful for giving carbs for various portions of a whole range of foods.