Cornering is a practice of a lifetime, but starts with good fundamentals. 1. Get low! The lower you are, the easier it is to maintain balance and keep your wheels from sliding. 2. Look! Keep your eyes up and look past the corner and generally keep your vision seeing everything instead of focusing on just one thing.. 3. Lean the bike more than the body. Once you get comfortable with the fundamentals start twisting the hips so your belly button points the way you want the bike to go and use your inside knee to counterbalance. Check out these short articles by Lee McCormack at https://www.theproscloset.com/blogs/news/mtb-cornering-tips and https://www.rei.com/blog/cycle/cul-de-sac-kung-fu-essential-cornering-drills-you-can-do-anytime-anywhere.
You can guarantee that if your bike breaks down on the trail, it's usually started raining, you've forgotten an essential tool and the mosquitoes are out for blood. Be smart like Colin and remember to do your ABC Bike Check before every ride.