This research investigates elastically constrained beams, including Timoshenko, shear, Rayleigh, and Euler–Bernoulli beams, positioned on diverse foundations such as Pasternak, Hetényi, and Filonenko–Borodich, and subjected to compression and tensile forces. The significance of this study lies in providing a critical dynamics response to the behavior of various beam types under varying foundation conditions, elucidating the influences of important factors such as shear modulus, flexural rigidity, foundation stiffness, rotatory effect, and shear deformation effects. The determination of the dynamical behavior of the problem is particularly challenging, dealing simultaneously with four engineering theories of beams positioned at different foundations under elastic constraints. The problem has been analytically solved by extending the separation of variables approach, involving coupled eigenvalues in the dispersion relation and leading to the development of the spatial matrix for slopes and displacements, along with their derivatives. The complexity of the problem necessitates a rigorous procedure for coupling eigenvalues, deviating from the standard approach. Consequently, analytical handling proves challenging and relatively sensitive to variations. Therefore, a numerical scheme using Galerkin finite element method (GFEM) has been obtained, recognized for its accuracy compared to other techniques like Differential Transform Technique and Rayleigh Ritz technique in finite element methods. The GFEM approach employed here offers a relatively simple and convenient solution, demonstrating effective convergence to exact solutions without shear locking. This further opens a pathway for delving into more intricate and challenging problems in beam dynamics within the scope of investigation. The obtained results indicate that beam eigenfrequencies of different models are higher under tensile forces and decrease with reduced compression forces. The study provides valuable insights for ideal design under specific conditions, highlighting the importance of incorporating foundation characteristics, compression, and tensile forces in beam dynamics.