question: The World Health Organization (WHO) recognized COVID-19 as the cause of a global pandemic in 2019. COVID-19 is caused by SARS-CoV-2, which was identified in China in late December 2019 and is indeed referred to as the severe acute respiratory syndrome coronavirus-2. The whole globe was hit within several months. As millions of individuals around the world are infected with COVID-19, it has become a global health concern. The disease is usually contagious, and those who are infected can quickly pass it on to others with whom they come into contact. As a result, monitoring is an effective way to stop the virus from spreading further. Another disease caused by a virus similar to COVID-19 is pneumonia. The severity of pneumonia can range from minor to life-threatening. This is particularly hazardous for children, people over 65 years of age, and those with health problems or immune systems that are affected. In this paper, we have classified COVID-19 and pneumonia using deep transfer learning. Because there has been extensive research on this subject, the developed method concentrates on boosting precision and employs a transfer learning technique as well as a model that is custom-made. Different pretrained deep convolutional neural network (CNN) models were used to extract deep features. The classification accuracy was used to measure performance to a great extent. According to the findings of this study, deep transfer learning can detect COVID-19 and pneumonia from CXR images. Pretrained customized models such as MobileNetV2 had a 98% accuracy, InceptionV3 had a 96.92% accuracy, EffNet threshold had a 94.95% accuracy, and VGG19 had a 92.82% accuracy. MobileNetV2 has the best accuracy of all of these models.