Solution 1 :

You can do it like this :-

{
   "editor.formatOnSave": false,
   "[html]": {
       "editor.formatOnSave": true
   }
}

Solution 2 :

You can globally disable VSCode Format On Save altogether and enable it for only a handful of programming languages ( identifiers for languages ).

Referance from.

so for HTML, check below,

{
   "editor.formatOnSave": false,
   "[html]": {
       "editor.formatOnSave": true
   }
}

Problem :

The following settings will be formatted when any file is saved.

I just need to format the HTML file when it is saved

{
  "editor.formatOnSave": true,
}

By