What YouTube asks for
At the time of writing, YouTube's help page asks for a 16:9 thumbnail at least 640 pixels wide and suggests 3840 × 2160 for the sharpest result. 1280 × 720 and 1920 × 1080 are common sizes too. It accepts JPG and PNG files, up to 2 MB when you upload from a phone and more from a computer.
Use the largest of those sizes your picture already has. Enlarging a small picture makes it bigger but not sharper, because the extra detail is invented.