Helium has 2 electrons in the first shell which can accomodate a maximum of 2 electrons. As the shell is completely filled, Helium is stable.
Beryllium has 2 electrons in the second shell which can accomodate a maximum of 8 electrons. As the shell is not completely filled, Beryllium is not stable.
Beryllium can lose two electrons to get a stable noble gas configuration. Thus it has an electron donating nature. Hence it behaves as a metal.
HOPE U LIKED THE ANSWER :D