In recent years, deep learning's identification of cancer, lung disease and heart disease, among others, has contributed to its rising popularity. Deep learning has also contributed to the examination of COVID-19, which is a subject that is currently the focus of considerable scientific debate. COVID-19 detection based on chest X-ray (CXR) images primarily depends on convolutional neural network transfer learning techniques. Moreover, the majority of these methods are evaluated by using CXR data from a single source, which makes them prohibitively expensive. On a variety of datasets, current methods for COVID-19 detection may not perform as well. Moreover, most current approaches focus on COVID-19 detection. This study introduces a rapid and lightweight MobileNetV2-based model for accurate recognition of COVID-19 based on CXR images; this is done by using machine vision algorithms that focused largely on robust and potent feature-learning capabilities. The proposed model is assessed by using a dataset obtained from various sources. In addition to COVID-19, the dataset includes bacterial and viral pneumonia. This model is capable of identifying COVID-19, as well as other lung disorders, including bacterial and viral pneumonia, among others. Experiments with each model were thoroughly analyzed. According to the findings of this investigation, MobileNetv2, with its 92% and 93% training validity and 88% precision, was the most applicable and reliable model for this diagnosis. As a result, one may infer that this study has practical value in terms of giving a reliable reference to the radiologist and theoretical significance in terms of establishing strategies for developing robust features with great presentation ability.