Well, you should be seeing about 30 miles at 25 mph out of a 48v 20 ah pack. What size is yours?
If it was the very first ride, you could see some improvement. Batterys do need a bit of break in. Now you may have done your break in all wrong, but don't fret it. Plug it into the charger, and leave it on the charger when not riding for about a week. Your pack may be simply way out of balance, and one weak, undercharged cell is causing the bms to shut off. If you are lucky, the problem will go away.
On the other hand, cheap peice of crap lifpo4 bike batteries are common. Dud cells inside prevent you from ever discharging more than 15 ah from a 20 ah pack. Good luck getting sellers to fix one. There is a reason we recomend only two or three battery sellers over and over and over.
Hopefully, your pack is just out of balance, and will still discharge 18 of your 20 ah, and be pretty usefull to you for a long time.
THE LIPO RULES. NEVER ABOVE 4.3V NEVER BELOW 2.7V DON'T PUNCTURE
Ideal charging /discharging range for Lipo, 3.65v minimum 4.1v maximum
See battery technology section, FAQ thread at the top of the page for lipo noob info.