a couple of things - usually and in general your bike gps updates its position around once a second. The wheel sensor is a lot faster than that so it tends to both a lot more accurate and a lot smoother.
all of this bike wireless network stuff ultimately has to rely on the black magic of RF and that gets into parts of the device that are difficult to test.
presuming you’ve updated the batteries, it’s a lot more likely that your having a problem with either the sensor or the computers radio (more likely the sensor).
I'm inferring here since you say it’s a back wheel sensor so I’m guessing it’s the old style with a magnet pickup on the wheels and probably on the crank for cadence. These were known for being difficult for two reasons: first, the air gap from the magnet to the sensor is critical. If that isn’t perfect you may have an intermittent pickup from the magnet. Secondly, the Bluetooth sensor is fairly far from the computer and if the sensor has a weak radio it may be not a great connection to the computer. This is doubly true if your Garmin computer has a weak receiver (although they tend to be pretty good).
You can sort of test this by spinning the bike wheel on a bike stand and taking the computer off the bike and walking a distance away keeping an eye on indicators that show the wheel spinning or the sensor connected. With some weak sensors, you’re lucky to get even 4-6’ away. For a good sensor you can get 15’ or more.
if I’ve guessed your sensor correctly, I’d advise dumping it. Those were tricky and inconsistent and they haven’t been built for a while. Newer sensors rely on a switch in the sensor that trips every revolution and no magnet is required which eliminates the other problem. The newer sensors since they’re not magnet driven work very well on the front hub where they’re easier to get at and they are directly in line with the computer with nothing in the way to disturb it’s tiny radio.
If I’ve guessed the last sensor wrong, then it could be you just have a lousy sensor. You can test this by putting another sensor in its place and seeing if that works fine.
I went through a similar deal with trying to get my Stages gen2 PM to work with my Hammerhead K1. I spent hours and hours with both Hammerhead and finally stages. Turns out the gen2 Stages PMs have a very wimpy radio that is fixed when they (for free) upgraded my PMs all to gen3. At gen2, the PM could barely reach and then intermittently the handlebars. With Gen3, I could connect 20’ away. Given I’m an electrical engineer, this drive me completely nuts and I wound up with my being on a first name basis with both Stages and HH tech support over an entire summer.
in my case, It was not practical to swap out power meters for another one to verify if it was the PM. Fortunately for you, it is easy and practical to swap out wheel and cadence sensors. Give that try and if it doesn’t work, then borrow a bike computer and see if the problem is inherent in that computer. highly likely that’s where the issue lies and not deep in the weeds of smoothing and sampling theory (which is actually part of my engineering specialty). Almost always with all my tinkering on this stuff, it’s first off a battery issue. If it’s not that then it’s a sensor/Rf issue. If it’s not that, then it’s a bad receiver in the computer.
good luck. I’ve been down the data integrity rathole too. I feel for you.
here’s a good article in gps accuracy on bikes.
https://www.bike-mag.com/how-your-gps-lies-to-you