How to configure different .env file for each environment

System Information
  • Strapi Version: 4.25.5
  • Operating System: windows
  • Database:
  • Node Version: 20.11.0
  • NPM Version: 10.8.1
  • Yarn Version:

I am new to strapi. I have installed Strapi and customizing it. i need to deploy Strapi in DEV, Testing, UAT and PROD environments. each environment has specific environment variable values. i tried to create .env.dev, .env.qc, .env.uat and .env.prod and set the NODE_ENV variable to respective environment but it is not working. please let me know how to solve this issue.