How often do you need a colonoscopy?

I had a colonoscopy 2 years ago, but recently I started experiencing abdominal pain, bloating, gas and constipation that has been ongoing for weeks now. Of course google has all of these scary things, including cancer that come up. I have an appointment with my doctor on November 5th (earliest I could get in). In the meantime, I am trying not to panic too much. I read online that if you had a clear colonoscopy that you should be good for 5-10 years. Anyone know if there’s any truth to this?