Carpet as an air filter
The carpet in your home is really an air filter. Yup, besides being warm and soft underfoot, an important function of carpet and area rugs is to capture and hold on to dirt and dust so that it never makes it into the breathing zone. The challenge is that you have to defeat the carpets ability to hang on to dirt when you are vacuuming and at the same time make sure your vacuuming doesn’t just spew that stuff into the air.
For dry granular particles, the best method of carpet cleaning is to vacuum with a lot of airflow while using an agitating beater bar. Oh, and everything you vacuum should be collected in the canister and the air vented to the exterior.
Unless you have those three things working well for you, you might be doing more harm to your health than good.