Before I answer your questions, I just want to warn you that the move towards embracing the M1 chip in an iPad is really slow. We still have 'mobile' version of apps even though the iPad Pro is capable of getting the computer version. Especially since not all iPads have the M1 chip, that might also be why developers aren't pushing the iPad so far. So it might take a few years until we finally see iPad apps on the same level as desktop apps.
​
Finally, if you're sure about getting an iPad, I recommend at least a 256gb iPad Air or a refurb 2020 iPad Pro. These iPads are powerful enough for the tasks you've mentioned and you can always go for the newer ones if you want.
If you're serious about music production and programming, the iPad may still be limited. For a DAW, I recommend apps like GarageBand or Cubasis on iPad. However, they are still limited compared to computer softwares such as Logic Pro and Cubase.
I don't know much about programming, but here's a threat that discusses programming on an iPad.
For video, Lumafusion is a very well featured NLE. Definitely adequate for YouTube type videos.
For photo, Adobe have a good selection of apps if you are willing to get a CC subscription. Photoshop and Lightroom are great on an iPad Pro.
I HIGHLY recommend Luma Fusion. It is a wonderful video editing app that allows you to import content from Box, Dropbox, iCloud Drive, Google Drive, etc. It has a wide array of effects, and can handle up to 6 video/audio tracks. It’s everything iMovie should be. It reminds me of the old Final Cut Express. Check it out. It’s well worth the cost.