Pedaling narrow trails requires special skills that you can develop and improve during every ride.
Here’s what I.M.B.A. recommends:
Start by keeping your arms flexed, not locked. On rocky or rutted trails, try to follow the path of least resistance. Imagine where you want your bike to go, and don’t focus on the obstacles you want to avoid (if you do, you’ll probably hit them). Learn to use both your front and back brakes. On steep climbs, lower your elbows and drop your upper body closer to your bike¹s top tube. This will help you maintain tire traction. Finally, hold the handlebar firmly but not with a death grip–too much squeezing will make you tired and increase the likelihood that you¹ll make steering mistakes.