I want to auto closing the html code in the html.erb file.
What should I do?
Added screenshots

Add this to your user settings:
"emmet.includeLanguages": {"erb": "html"}
Example with erb and ruby:
You don't need to install any extension, just add this to you User settings.json
file in VSCode at the end of the file, and it will work like a charm.
"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {"html.erb": "html", "erb": "html"}