The management of the hardware as well as software resources entrusted to third-party service suppliers have shown to be extraordinarily remarkable and accessible with Cloud Computing (CC), a potential computing technology for the future. Yet, a major undertaking is characterized by security as well as the use of Virtual Machines (VMs) to perform a request. The main issue with using technology is security worries, which raises the need for a strong security system to safeguard data on the cloud. Thus, to address this problem, a method called Weighted Mean-based Radial Basis Function Network with Advanced Encryption Standard (WMRBFN-AES) is developed to improve cloud security along with the time of execution. Random keys are produced utilizing the Pseudo Random Number Generator (PRNG) technique, and the best keys are created employing the WMRBFN technique. In the WMRBFN technique, randomly generated keys are used as input, and the hidden layers yield an estimate associated with the secret key of the input. The output layer generates the most precise secret keys to encrypt the data. Encryption is carried out using the AES algorithm. The files about the encrypted data are kept in a cloud storage system. Reduced execution times for stakeholder demands (tasks) as well as optimal cloud resource utilization result from the selection of VMs, which significantly improves reliability. The Migration Algorithm (MA) is used in the cloud framework to optimize the selection of VMs to improve resource utilization and performance. The experimental findings of the suggested framework and the state-of-the-art frameworks are compared, and it was found that the new model performed better in terms of cost, resource utilization, service latency, throughput, and execution time.