You can install the Graphviz Interactive Preview into VS Code.
Then you just right-click the .dot file and choose "Preview Graphviz / Dot (beside)".