How to avoid quality loss on yotube/fb when encoding images into video via FFMPEG
YouTube re-encodes whatever you give it. The process is lossy so there will be a quality reduction. All you can do is give it a very high quality:

ffmpeg -framerate 10 -pattern_type glob -i 'resized/*.JPG' -vf scale=1280:-2 -c:v libx264 -crf 17 out.mp4



Use -crf 17 or -crf 18 for higher quality.
Try without -pix_fmt yuv420p. I'm not sure what YouTube uses for pixel format conversion, but perhaps it will look better than the FFmpeg swscale if they are using something different.
No need for -profile:v high. Let the encoder choose. You usually only need to set a profile when your target device is limited in profile support.