As indicated in the Bearing widget, it is important to understand Bearing and Heading. Heading is either determined by the internal compass (See Preferences/Connection & sensors) or calculated by XCTrack based on Bearing and wind if the internal compass is not enabled.
We recommend that you do not use the internal compass, but instead use your bearing and wind to determine your heading. Using the internal compass means that you need to keep it calibrated. A second reason is that there is a slight delay when the sensors calculate the heading based on the way the unit is held, i.e. tilted. On the other hand, the calculation of heading based on bearing and wind is instantaneous.