Go to the Vercel dashboard, open your project, go to Settings > Environment Variables and paste the keys you use in .env.local there. Create a variable for each one (API_URL, API_KEY, whatever you need) and mark which environment each one works in - Development, Preview, Production, or all three. After that when Vercel does the build, it injects those variables into the process and the application can access them via `process.env.VARIABLE_NAME`.
Now, the thing people frequently forget: if you're using variables that can only be accessed on the server (like database passwords or secret API keys), you only need to prefix with `NEXT_PUBLIC_` the ones that go to the client-side. Everything without that prefix stays secure on the server during the build. If you put a sensitive key with `NEXT_PUBLIC_`, it leaks into the JavaScript that the browser downloads - then it's no longer secure. So be careful with that convention, because it's easy to mess up.
One useful tip too is to copy the structure from your .env.local into a file called .env.example (or .env.local.example), remove the actual values, and commit that to Git. That way whoever works on the project knows exactly which variables they need to set up both locally and in Vercel.