If you have CubeMX v4.24 or above installed, you'll notice a new menu item named "select additional software components" under Projects menu.
If you open it you'll see an empty window.
What is it you might ask? Well according to CubeMX user manual which is Here, in Section 5.10.1 you'll find that it's a new support for ARM Keil software packs.
The User manual explains in details how to use it so I recommend reading it. what it doesn't explain is how to set it up (why??) which I'll explain.
After opening CubeMX :
1- In Help menu click "Manage Embedded Software Packages" (Shortcut Alt+U).
2- At the bottom of the "Embedded Software packages manager" window click on "From URL".
3- in the new window click "new".
4- Enter Keil packs index URL which is http://sadevicepacksprodus.blob.core.windows.net/idxfile/keil.pidx
(Note: The original URL is http://www.keil.com/pack/index.pidx but for some reason, it doesn't work so we have to enter it by the vendor as described in the window.
Our vendor here is Keil so we have to enter http://www.keil.com/pack/keil.pidx which redirects to the link mentioned).
5- Click "Check" , you should see the green sign almost instantly.
6- Click "Ok" .now CubeMX starts fetching the pack information which takes a while. Go for a coffee break!
7- After it's finished you'll see the new pack listed and also in the "Select additional software components" list after you create a new project.