## 1 Introduction  
The incidence of both non-melanoma and melanoma skin cancers has increased in recent decades. Currently, between 2 and 3 million non-melanoma skin cancers and 132,000 melanoma skin cancers occur globally each year, as reported by the World Health Organization (WHO). The global rise in skin cancer cases underscores the need for effective diagnostic and treatment methods. As indicated by the World Health Organization (WHO), the rising pervasiveness of non-melanoma and malignant melanoma skin growths requests pressing consideration. In the U.S. alone, more than 9500 people find a malignant skin growth day to day, and multiple individuals capitulate to the infection consistently [1; 2; 3]. One of the key factors that significantly impacts a patient's life is diagnosis. Correctly diagnosing serious cases can contribute to higher recovery rates by directing patients to early treatment [4]. However, the diagnostic stage faces several challenges that may lead to early misdiagnosis, including difficulties in distinguishing skin lesions with the naked eye, the high costs and unavailability of necessary diagnostic tools and technologies in many healthcare facilities, as well as human errors related to the expertise of specialists and the wide variety of skin lesions, which lack general features for differentiation [5; 6; 7]. Then again, profound learning, a subset of AI in machine learning, has achieved satisfactory results in the analysis and processing of medical images [8]. Deep learning models have shown significant promise in diagnosing different kinds of skin cancer, including basal cell carcinoma, squamous cell carcinoma, and melanoma. These models can analyze clinical, dermoscopic, and histopathologic images to identify cancerous lesions with high accuracy. By leveraging deep learning as a decision support tool, healthcare professionals can enhance their diagnostic capabilities, leading to earlier detection and improved patient outcomes [9]. The wild development of strange cells in the epidermis, the furthest skin layer, is brought about by unrepaired DNA damage that triggers transformations. These changes lead the skin cells to increase quickly and structure dangerous cancers [10]. The VGG16 model, a convolutional neural network (CNN) architecture developed by the Visual Geometry Group at the University of Oxford, has shown significant promise in skin cancer detection. VGG16 is known for its deep architecture with 16 weight layers, which permits it to catch many-sided subtleties in medical pictures. Studies have demonstrated that VGG16 can effectively classify skin cancer types, such as melanoma and non-melanoma, by analyzing dermoscopic images. Its ability to distinguish subtle differences in skin lesions makes it a powerful tool for early diagnosis. A study published in MDPI's _Diagnostics_ highlighted that VGG16, when combined with transfer learning, significantly improved the classification performance in differentiating between benign and malignant skin conditions [11]. The application of VGG16 in clinical settings can assist dermatologists in making more exact analyses, eventually prompting better tolerant results and timely treatment [12]. One of the most common types of skin cancer in the non-melanoma category is basal cell carcinoma (BCC). Basal cell carcinoma is the most widely recognized disease in people with a light complexion type and is consistently expanding in frequency [13; 14]. In the melanoma category, there is one type, which is melanoma (MEL). Melanoma skin disease is viewed as the most serious of all malignant skin growths [15]. In certain individuals, we can see \"moles\" called \"nevi\". They are non-cancerous skin lesions, but they can develop into skin cancer and manifest in various forms [16]. In a meta-examination on neu as hazard factors for melanoma, the most noteworthy gamble (around 7-fold) for melanoma was seen in people with an excess of 100 nevi [17].