Nothing to preview yet.
The usual VS Code route is an extension that downloads its own copy of Chromium and often falls over doing it. Paste the Markdown here instead and skip the install entirely.
Producing a PDF needs a browser engine, and a VS Code extension has to obtain one. The popular Markdown PDF extension downloads a private copy of Chromium the first time you run it, which is where most of the reported trouble starts.
Select all in the editor, copy, and paste into this page — or drag the .md file straight from the VS Code explorer onto it. The preview is the real page at the real width with the real margins, so you can correct the layout before producing anything rather than after. Nothing is installed and nothing is configured.
The differences are mostly the things that need a configured engine to work at all.
A web tool is not always the right answer — for a build step, a private document, or an offline machine, a local converter is better. Pandoc is the dependable one, and with a LaTeX engine installed the whole job is a single command:
Copy the file's contents out of the editor and paste them here, or drag the .md file from the VS Code explorer onto this page, then click Download PDF. Nothing is installed.
It downloads its own copy of Chromium on first use. That download fails on restricted or proxied networks, and the resulting error rarely makes the cause clear.
Yes — pandoc notes.md -o notes.pdf, with pandoc and a TeX distribution installed. It is a large install and Mermaid diagrams need an extra filter, but it works offline and fits into a build.