From this section of the Flight Simulator guide, you will learn how to turn on the autopilot.
Autopilot in Microsoft Flight Simulator is a somewhat confusing feature. Because of the realism, the Autopilot acts as a real autopilot, and only some planes have it. It also requires complicated preparations (see another chapter of the guide for a description of them). However, it is possible to activate a streamlined autopilot, which involves handing over the controls to the second pilot - an AI that will pilot the plane for us.
To quickly hand over the piloting to the AI, simply input the following combination LCTRL + ALT + X
It turns AI control over the aircraft on and off.
Alternatively, you can use the toolbar and select the option to hand over the controls to the AI.