Most common culprit is the simple check valve on the water inlet side of your water pump.
It can be a failed check valve or simply a little bit of dirt/grit in there. They are easy to clean, easy to replace and you may not need to do anything more than turn off the city water and live off of all that water in your tank using the pump for a few days.
When you’ve used up most of the water in the fresh tank turn the pump off and turn the city water back on. If it doesn’t happen again you’re probably good, for a while at least. If it does refill the tank you probably will need to replace it.
Some folks just buy a small cheap plastic check valve and install it in front of the water pump then it doesn’t matter if the built in check valve fails again.
None of us know what RV or water pump you have as you’ve not mentioned this info. But here’s a link to the common Shureflo water pump in many Winnebago RV: