I want to know how to get the information about a microcontroller from its name, like the STM32F407VG. I know that the F407VG has got some information about the STM32 discovery board, but not sure what it is.
Each manufacturer labels its parts however it likes, usually explained on the datasheet or ordering information of its web site. For this particular part, a STM32F407VG is in a 100-pin package (V) and has 1024 Kbytes of memory (G).
From the ordering page of the datasheet:
From STM32 datasheet https://www.st.com/resource/en/datasheet/stm32f407vg.pdf