I am definitely not an expert in all things bike / tech, but if you are using your own bike on a trainer, you can get a cheap (like $25?) bicycle computer (like a tiny cateye) and as long as it is wireless (most are, these days), you can mount the sensor on your back wheel and crank and it’ll tell you your speed/cadence/mileage. I like to keep my cadence to around 90RPM and adjust the resistance from there depending on how hard your peloton workout is telling you to go. (I’m sure folks have many different opinions/advice, but I think that’s a really simple rule of thumb.)
If you have a multisport garmin, you can also buy just the sensor that will transmit to your garmin.