Heartbeat sounds serve as biological signals that aid in the early identification of cardiovascular conditions. Phonocardiograms (PCG), which are recordings of digital heartbeat sounds, are employed for the identification and automated categorization of potential heart ailments. This research presents a technique for categorizing heart sounds by combining WST (Wavelet Scattering Transform) & EO (Equilibrium Optimization). The signal of cardiac sound can be divided into 2 main kinds, abnormal & normal, concerning the signal of PCG. This work analyzes the characteristics of the phonocardiogram signal and subsequently employs machine learning methods to classify these features. During the feature-extracting process, we employed wavelet scattering in conjunction with the equilibrium optimizer method. We utilized the K-Nearest Neighbor (KNN) classifier for the purposes of learning and categorization. The experiments aimed to assess the impact of the optimization technique on the algorithm's performance, demonstrating its effectiveness. The findings revealed that our method achieved an accuracy of 99.5% when applied to the PCG dataset in distinguishing abnormal heart sounds from normal ones, surpassing the performance of all previous methods.