Buying a first synth, with the idea of learning the basics of synthesizers, is quite a broad stroke of a brush on your pallet. Digital, Analogue, Eurorack, Rompler, Subtractive, Mono, Poly, FM, Knobs, Sliders, CV, Midi, and anything I just mentioned is just one possible avenue for exploration!
A Moog Sub37 is a great investment, and you'll learn about waveforms (square, triangle, saw, sample+hold), filters, Control Voltage, and it's a synth you won't get bored of easily. But sooner or later, you will want to explore other synths to compliment it.
You can spend insane amounts of money out there, but not to worry, you can probably find some bargains out there too. Use eBay as your last resort if you can't find a certain synth in your area. Mainly because you can't exactly try it out & see if it's got the sounds you'd want in your tracks. If you have a used musical instrument shop in your area, drop by. Look at what you see. Ask the salesperson what they can tell you about the synth. Some are old, but jumping in value or price. Yet, because they're a bit old, they are trapped in primitive MIDI control (Note on/off), and won't have all the bells & whistles of something you can get for new. But it will have a warmth or charm the latest synths don't.
At the end of the day, eventually you will understand how a synthesizer makes its sounds, how the filter cuts out frequencies that make the sound harsh or nasty, to nice & smooth, and how the LFO (low frequency oscillator) wobbles the sound, and how the amp sends it out to your mixer/daw.
When you're ready, you might want to invest in a modular synth, and the tons of filters, oscillators, clock dividers, envelopes, FX out there. You can make a sound that you won't be able to buy from any manufacturer or sample library. But as soon as you unplug the cables, you may never get again. (Keep a notebook handy or take as many pics in your camera to figure out what cables you routed to where, & you might possibly get that sound again). It's going to be a rats nest of wires if you invest in a Eurorack modular synth, but you can always start with a Artuia Minibrute & expand around it. There's also the Roland System 1m, Dreadbox Erebus, Make Noise No-Coast, Doepfer Dark Energy that can get your feet wet in CV synthesis.
Oh, another thing to think about. Since you're setting your sights on a Moog Sub37, think about expanding its capacities with Moogerfooger FX pedals. Especially a CP251, since you can further process the waveforms, filters from it. But having a ring mod, phaser, chorus/flange will make it sound dope too.
Have fun, do your homework, watch YouTube clips, and ask more questions on other forums if you don't find the answers here.