I lost my first factorio run because i ran out of copper and the bugs kept attacking until i ran out of ammo

i have never heard of anyone losing the game except me