On the Android Developer site you can download Factory Images or Full OTA Images.
What are the exact differences between them?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
Factory images are meant to be flashed using fastboot or alternative low-level tools or environment. They come with batch and shell scripts to automate flashing. Flashing them requires a device's bootloader be unlocked (is considered a data security risk by OEMs). Flashing factory images in entirety would always delete user data, unless the user has taken precaution before flashing, such as excluding userdata partition from the script or running other available and relevant scripts.
On the other hand, full OTA images are over-the-air updates that are to be flashed via recovery environment or seamlessly in A/B supported devices. OTA updates are usually either incremental or full. Incremental updates require the user to be running a specific Android build (not just Android version) as they increment in the existing build only. On the other hand, full OTA updates don't require a specific existing build to continue. They are handy when a user hasn't updated their system for a long time and wants to skip successive incremental updates. In addition, per an answer here from beeshyams, any full OTA in theory should carry all the previous security patches made available up to the release of that OTA.
I myself had jumped from an Android 9 build to an Android 10 build using a full OTA on a OnePlus 6 even though there were a couple of incremental builds between those two builds.