Although brain tumours are few, they have one of the highest mortality rates among all types of cancer due to their abnormal growth and proliferation. Brain tumours develop due to the accumulation of abnormal tissues in the brain. Various forms of abnormal tissue exist, however, in the majority of cases, they develop in a regular manner and perish without creating any detrimental effects. Digital twins are occasionally known as digital mirrors, digital mapping, and digital replicas. All of these are synonymous terms for the identical entity. It is a technique for transferring digital or physical information from one realm to another. Image processing involves enhancing or eliminating data from a photograph to achieve a certain objective. Convolutional neural networks are a specific type of neural network that take signals from images as input and produce the image itself or a subset of its elements as output. This research presents a technique for identifying brain cancers using digital replicas and advanced machine learning algorithms by analysing MRI images. Images obtained from MRI machines are stored in a centralised cloud using Internet of Things (IoT) digital devices. The input pictures and other health-related data are then retrieved from cloud storage. The Particle Swarm Optimization approach chooses features. Brain tumor images are classified using machine learning techniques such as convolutional neural networks, support vector machines, and extreme learning machines. The CNN algorithm demonstrates greater accuracy when assessing MRI images for the purpose of identifying brain tumours.