Sorry to hear this - sometimes this happens - OK for years on metformin and then diarrhoea or nausea.
One can try modified release metformin which fixes the problem half the time ie does not help half the time. Taking the metformin at the end of the meal can help. Or can reduce dose eg 500 mg three times per day.
Has anything else happened to cause this?
But is generally the metfomin
Best wishes