In a deploy the code is built first, and the files that come out go to a server. Once Vercel is connected to the repo it does this on its own, and every merge into main starts a new deploy.
In the free 2-hour program the first deploy happens before a single line of code is written. The agent there runs pnpm build before it opens a PR, so a build error shows up while you're still on your computer.