Hydrogen (H) and Helium (He) atoms restricted by an impenetrable spherical box within plasma environment sight are investigated. The effect of compression and the presence of the plasma environment on the energy of H and He in the ground state is investigated. The plasma effect is considered by utilising Debye screening potential. The Schrödinger equation is solved using the variational Monte Carlo method with a compact trial wave function depending on many variational parameters. Our results are compared with the most recent accurate values. The obtained results are in agreement with the latest results. These results could be extended to incorporate He-like ions up to Z = 10 with good precision.