Do diet pills affect your thyroid?

Maybe. But diet pills can cause or exacerbate symptoms of hyperthyroidism. Diet pills should not be taken without md supervision. If you are having jitters, heat intolerance, heart palpitations, etc make sure you get seen asap.
No. But they also don't help you lose weight long term. The prescription drugs work while you're taking them. The otc supplements don't work at all.