How does a doctor determine if a thyroid will never function again?

Clinical history. it depends upon the clinical condition.

If hypothyroidism is because of Hashimoto disease, in most cases hypothyroidism is permanent.

If hypothyroidism is because of inflammatory condition called thyroiditis, in those situations hypothyroidism can be temporary.