The COVID-19 pandemic has severely impacted global healthcare and financial systems, Highlighting the need for an automatic computer-aided diagnosis system using image recognition for chest X-rays(CXR). This study aims to classify COVID-19, normal, and pneumonia patients from CXR images via a modified ResNet-50 pre-trained CNN model. Our experiments are based on Dataset-1, which contains CXR images of COVID-19 and normal, while Dataset-2 also includes pneumonia. Dataset-1 and Dataset-2 were collected from King Abdul-Aziz Medical City in National Guard, Jeddah, Saudi Arabia. Moreover, a sample from the Kaggle repository was added to Dataset-1 and 2 to make two more Datasets. Our results for diagnosis of raspatory diseases have shown reliability and high accuracy of 95.28% (97.66% Sensitivity and 93.12% Specificity), which will be beneficial in aiding physicians and healthcare centres in the global fight against harmful spreading viruses through employing AI and ML techniques in X-ray medical diagnosis.