With the increasing prevalence of thyroid-related disorders, the need for personalized dietary recommendations for thyroid patients becomes paramount. This study introduces an optimized recommender system that leverages Particle Swarm Optimization (PSO) and K-means Clustering to provide tailored food recommendations for individuals with thyroid conditions. The proposed recommender system utilizes historical patient data encompassing dietary habits, thyroid health metrics, and treatment outcomes to identify relevant patterns and clusters within the dataset. The system recommends food items that are rich in essential nutrients beneficial for thyroid health while avoiding those that may be harmful. Here utilizes a comprehensive dataset of food nutrient values to develop the recommender system. The PSO algorithm is employed to optimize the clustering process in K-means, leading to more effective and accurate cluster formation. Incorporating PSO better captures the optimal centroids of the clusters, resulting in enhanced recommendations for thyroid patients. The performance of the proposed system is evaluated using the Davies-Bouldin index score, which measures the compactness and separability of the clusters. The lower the Davies-Bouldin index, the better the quality of the clustering. To further assess the effectiveness of the PSO-K-means approach, a comparison is made with other algorithms. The comparison is made based on the Intraclass Inertia of each algorithm. The experimental results demonstrate that the PSO-K-means algorithm outperforms other optimization algorithms in terms of the Davies-Bouldin index score. The optimized recommender system provides more accurate and relevant food recommendations for thyroid patients, considering essential nutrients and avoiding harmful ones.