From the manual:
Drive to Calibrate Cameras
Model Y must maneuver with precision when Autopilot features are being used. Therefore, before some features can be used for the first time or after some types of service repairs, cameras must complete a self-calibration process. For your convenience, the touchscreen displays a progress indicator.
When calibration is complete, Autopilot features are available for use. Calibration typically completes after driving 20-25 miles (32-40 km), but the distance varies depending on road and environmental conditions. For example, calibration completes quicker when driving on a straight road with multiple lanes, such as a freeway or highway, with highly-visible lane markings (in the driving lane as well as the adjacent lanes). Contact Tesla only if your Model Y has not completed the calibration process after driving 100 miles (160 km) in the described conditions.
NOTE: To calibrate, cameras require highly-visible lane markings in both the driving lane and adjacent lanes (at least two lanes over on each side of the vehicle). For best results, drive in the middle lane of a freeway or highway (ideally with at least five lanes) that has clear lane markings and minimal traffic.
NOTE: If you attempt to use a feature that is not available until the calibration process is complete, the feature is disabled and the touchscreen displays a message.
NOTE: Model Y must repeat the calibration process if the cameras are serviced by Tesla, and in some cases, after a software update.
NOTE: If a camera has shifted from its calibrated position (for example, the camera or windshield was replaced), you must clear the calibration. To do so, touch Controls > Service > Camera Calibration > Clear Calibration. When the calibration is cleared, Model Y repeats the calibration process.