Feeling nervous about medicine

Has anyone else accidentally taken medicine that shouldn’t be taken when pregnant early on and everything turned out ok? Before I knew I was pregnant I had taken some medicine for a yeast infection... now learning that shouldn’t be taken while pregnant. Should I be worried? Currently 6 weeks.