Melanoma, the most widespread form of skin cancer, poses a diagnostic challenge requiring considerable expertise in visual assessment. This study aims to address this challenge by investigating a deep learning technique for the early detection of cancerous lesions to mitigate their potential spread. Gathering four public skin lesion datasets, totaling 13,986 images, we divided into 80% training, 10% validation, and 10% testing sets. Our proposed approach involves a VGG16 model with transfer learning from ImageNet, fine-tuned through adjustments in hyperparameters using learning rate of 0.001, Adam optimization function, and batch size of 32. Experimental results achieved impressive metrics with an accuracy of 0.92, recall of 0.89, and F1-score of 0.91. Additionally, our study in-corporates gradcam visualization to pinpoint skin cancer areas, offering a nuanced understanding of the model's outcomes. This proposed model holds promise for healthcare professionals in diagnosing and focusing on skin cancers.