Hiding API keys when using VS code instead of Replit for AI project

Since Replit only offers 3 free REPLs now, I decided to use VS code but Replit has a feature of Secrets through which we can hide the API key. If someday we push our code to github through VS code, we do not anyone to see the API keys we used. What we can do is create a dotenv file,store our API key in it and hide it using gitignore. I mentioned 2 links below which will help you in doing so.