I started "lifting" three months ago. But i dont go to a gym, I do bodyweight exercises. Does it really matter what I do as long my muscle mass increases?

Why is lifting advised and not endurance only training like running or swimming? Is it really all about the muscles?