For all of us there is an optimum RPM (cadence) that minimizes damage to your knees, produces the most efficient transfer of power to the wheels, and delays the onset of fatigue. You haven't figured out what that is yet. Spinning like mad obviously doesn't do it. Neither will mashing. Don't be afraid to use your gears to find the best cadence. I replace gear cables more often than tires. Shifting will become intuitive with some experience. I automatically downshift when approaching a stop or just before reaching a hill and shift up soon after starting out or going down a hill. I also shift with changes in the terrain. My routes are rarely completely flat. Yes, you will get better the more you ride but this is one thing that can hasten your improvement.