means that
taking steps to prevent trouble is generally preferable to repairing the damage after it has occurred.
also
Who repairs not his gutters repairs his whole house. An ounce of prevention is worth a pound of cure.
When it takes much more effort to put right something that could have been prevented with a little effort., the saying “Prevention is better than cure;” is appropriate.