Where this number comes from: YouTube recommends the largest image you can provide (it names 3840 × 2160 for video thumbnails, 16:9, at least 640 px wide). The file limit is 2 MB when uploading from the mobile app, 50 MB from a desktop browser.
The constraints that actually bite are the shape and the mobile cap. Video thumbnails should be 16:9 and at least 640 px wide, and YouTube asks for "as large as possible" — it names 3840 × 2160 — because the image also serves as the preview in the embedded player. 1280 × 720 satisfies both. The size limit is the one that catches people out, because it depends on where you upload: 2 MB from the mobile app, 50 MB from a desktop browser. A detailed photo saved at maximum quality can exceed the mobile cap even at this size; if your phone rejects the upload, drop the quality slider to around 80 and re-export — the difference is invisible at thumbnail scale and usually halves the file.
Most of the places a thumbnail appears are far smaller than 1280 px. In a sidebar or on a phone it is a couple of hundred pixels wide, which is why thumbnails that work are built from one large subject and a few words, not from a detailed scene. Resizing cannot fix a busy composition; it just makes it small.
The bottom right corner is covered by the duration stamp. Keep anything that has to be read out of it.
Questions
What if my file is over 2 MB?
That limit applies when you upload from the mobile app; a desktop browser accepts up to 50 MB. If the mobile upload is rejected, lower the quality slider or switch to JPEG — at 1280 × 720 a JPEG at quality 80 is normally a few hundred kilobytes and looks identical to one at 100.
Can I upload a bigger thumbnail than 1280×720?
Yes. YouTube recommends the largest image you can provide — it names 3840 × 2160 — because the file doubles as the preview in the embedded player. Anything 16:9 and at least 640 px wide is accepted, and 1280 × 720 meets both; most placements, sidebars and phones, show it far smaller.
PNG or JPEG?
JPEG for photographs. PNG only if the image is flat colour and text, where it can be both smaller and crisper. YouTube's guidance names JPG and PNG and promises nothing beyond them.