The management of the hardware as well as software resources entrusted to third-party service suppliers has shown to be extraordinarily remarkable and accessible with CC, a potential computing technology for the future. Yet, a major undertaking is characterized by security as well as the use of 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 WMRBFN-AES is developed to improve cloud security along with the time of execution. Random keys are produced utilizing the 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 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 current framework were compared, and it was found that the new model performed better in terms of cost, resource utilization, service latency, throughput, and execution time.