If you really want to learn about the working of the peripherals try searching the web for information about this in general, not just the STM32 setups. Like a search for "microcontroller timer peripheral" can lead you to
this.
Like others wrote, the reference manual is the place to find information about how to use them and what the register settings mean, but it does not tell much about the inner workings. For this you have to look into digital circuits.
If it is to learn how to use the STM32 peripherals specific, then I suggest to get yourself some hardware like a bluepill (STM32F103) including a ST-link V2 or V3 or a clone and think up of things you like to do with it. It depends on how much money you want to throw at it and how fast you want it. You can search Aliexpress or Amazon to find yourself some interesting boards.
The ST-link will allow programming and debugging, but you need some IDE for it, unless you like command line tools. It is possible to use GDB and openOCD on command line level to do all the needed tasks.
I myself use an old version of Netbeans IDE on Linux, but there are many other IDE's for it.
To go in deep I would say, forget about CubeMX and all other by STM32 supplied tools and their HAL. Go bare metal. It is not hard. For example see some of my work
here.
Depending on what OS you are on you can pick your poison, be it Microsoft or some open source setup.
When you have your setup just start programming and see if it works like you expect it to work. Having some tools to measure things can also be handy when working on peripherals. Like an oscilloscope to check if the pins are indeed making the intended PWM signal or that the SPI signals are what you expected.