breastmilk vs formula advice

Samantha • Momma of 2 girls👶🏽👶🏽🎀
my babygirl was born 3 weeks early & 1 week old & shes never been able to stay latched. I started pumping the milk out but im noticing im producing less & shes not gaining enough weight. I want to continue to breast feed because it benefits us both but what can i do if i stop producing? should i keep trying or just switch to formula?