Recently, social media platforms like LinkedIn, Twitter, Facebook, YouTube, etc., are immensely popular, especially in the pandemic era. This is because they provide connection and interaction between people by posting images, comments, or videos.YouTube has become a very popular video-sharing platform, and because of this, it has also attracted several types of spammers or malicious users whose aim is to distribute viruses or promote their videos. Spammers also want to spread phishing, malware, or advertisements in the comment section of the videos. Spam is generally related to unsought content or irrelevant comments with low-grade information. They are usually found as images, texts, or videos, clogging the visualization of interesting content. Users spend a lot of time eradicating spam since it causes a variety of issues that could lead to traffic and financial losses. To filter spam, several techniques have been developed. Automatic comment spam filtering on YouTube is not a simple task even for well-known classification methods since comments are very short and often contain slang, symbols and abbreviations. However, typical machine learning classification algorithms have been confirmed to be fairly effective, but there is still space for improved accuracy with new methods. In this paper, we will evaluate several topperformance classification techniques (such as Naive Bayes, Random Forest, and Support Vector Machine) of Machine Learning classification algorithms to detect such comments as spam or ham with the help of text classification, feature extraction and text pre-processing. It will work after posting the comments. This paper provides a comparative analysis of various ML techniques implemented by various researchers and authors in their work. The dataset would be used with reference to the UCI machine learning repository for future implementations of this related work.