I have been a professional carpet cleaner for years cleaning all types of carpets. No matter what type of carpet I'm cleaning I always get asked what is the best way to clean carpet. From the homeowners perspective the best way to clean your carpet is to vacuum it on a regular basis. I recommend at least twice a week if an upright or canister vacuum.
I see a lot of stick vacuums, sometimes called electric brooms here in Tampa FL but they don't have big enough motors to effectively pull soil from carpet. I still recommend a corded vacuum cleaner with a bigger motor to handle regular carpet cleaning.
A good upright vacuum can pull about 80% of the dry soil from your carpet in one session of vacuuming. Vacuum cleaners with a beater bar in the front are very effective carpet cleaners.
I get a lot of questions about robot vacuums theses days. Down here in Tampa FL carpets collect a lot of sand and robot vacuums are not very good at removing the deep settled sand at the bottom of the carpet. They just aren't nearly as powerful as a regular upright vacuum cleaner. I don't recommend any robot vacuums to my customers.
The best way to keep your carpet clean is to have a no shoe policy in your home and vacuum on a weekly basis.