With VS Code version 1.53 ( I am sure previous have this too) you don’t need to install any special extension. Just navigate to:
Preferences -> Settings -> Text Editor -> Formatting
make sure “Format on save” is enabled

with every time you hit Ctrl + S your file will be saved as well as code formatted.