Could thyroid problems have been caused by a virus?

Yes. Subacute and silent thyroiditis can be caused by several viruses. They can cause symptoms and usually resolve after a few months.
Thyroid issues. Most types of thyroiditis typically follow an upper respiratory infection or another type of viral infection.