The loss of Mars’ atmosphere was probably multifactorial, including the fact that Mars has a lot less mass than Earth, and therefore the escape velocity of atmospheric gases is less. It’s actually very interesting. Look up Atmospheric escape.
Yes, there’s debate on how massive a planet has to be to retain an atmosphere. Factors are surface gravity, magnetic field, solar wind, even temperature and spin. Very complex. But look at Titan—it has a mass less than a quarter of Mars, but an atmosphere thicker than Earth’s. Relevant factor: only 2.5% the solar wind Mars gets.