You can build the project wherever you like but in order to submit it you need a live link.
As @ILM mentioned there are other alternatives to Codepen but Codepen is recommended because it is super easy to submit a link for a live project.
You can build the project in VS code and then copy and paste your code into codepen to submit the project.