Depends if you’re using vectors only or images. If vectors it doesnt matter as much as you can always scale up your output size when rendering. If you use images within your animation you need to work in a higher size. Go for HD, 1920x1080 then. It’s then easy to output smaller if you wish but if you work in smaller size it’s much, much more work to scale up if needed.
Vectors what is ideal size for youtube. Or what are your ideal preferences.
IMHO, for most of the hobbyist animations 1280x720 is enough for youtube upload.