Really dial down the resistance, whatever the instructor says. Take it very easy - you'll build speed & strength more quickly than if you injure yourself! If you've gone from doing nothing to doing a spin class, then that is a lot of stress on your body. Ease into it.
Also - what warm up do you do off the bike?
You need to get the fluid in your joints flowing and you need to raise your body's core temperature a bit. So 5 minutes brisk walking, and some mobilisations. I walk to the gym which takes 30 minutes as my warm up, plus I then do a sequence of squats, burpees, press ups and lunges. I also do leg swings forwards backwards & sideways, plus torso & arm swings forwards backwards & sideways.
For you, you could do 10 minutes on a static bike, with low resistance & just fast enough to make your breathing a bit deeper, but not too much. Then maybe leg swings, body weight squats, some burpees (5 or so?) just to mobilise your legs and knee joints.
But mainly, keep resistance on the bike really low, and keep your speed low as well. You'll speed up as your body becomes accustomed to the exercise.
Also what do you do to cool down & what's your recovery? Again, walking is excellent active recovery. TRy to do a long walk the day after each spin class.