As Sheng Chen mentionned:
Open VS Code.
Press Ctrl + , (or go to File > Preferences > Settings).
Ctrl
,
In the search bar, type:
java.maven.downloadSources
Check the box (✅) to enable it.