Cloud computing has revolutionized how resources are provisioned and utilized, offering scalability and flexibility to meet varying computational demands. Virtual Machine (VM) allocation, a critical aspect of cloud resource management, aims to optimize resource utilization while minimizing operational costs. In this paper, we propose a novel approach for VM allocation using a combination of Teaching Learning Optimization (TLO) and Artificial Neural Networks (ANN). The TLO-ANN model is designed to enhance the accuracy and efficiency of VM allocation decisions by leveraging knowledge transfer from pre-existing cloud environments. The proposed approach integrates historical allocation patterns and resource usage characteristics from multiple source clouds, allowing the model to learn from diverse scenarios. The TLO mechanism adapts the knowledge acquired from the source clouds to the target cloud's specific conditions, enabling effective allocation even in cases with limited target domain data. Furthermore, the ANN component of our approach provides a dynamic decision-making framework by continuously learning and adapting to changing workload patterns. The model considers multiple parameters to predict optimal VM allocation strategies, including CPU utilization, memory usage, and network traffic. The results demonstrate that our TLO-ANN approach outperforms traditional allocation methods regarding resource utilization, cost efficiency, and scalability. Through extensive experimentation and comparative analysis, we validate the effectiveness of the proposed TLO-ANN approach across various workload scenarios. The results showcase its ability to adapt to cloud environments, improving allocation accuracy and response times. Overall, this research contributes to advancing intelligent VM allocation techniques in the cloud computing Environment.