Only one thing was missing :
<<this line >> import "dotenv/config";
i did npm i dotenv and added the above line
my connection was established after i ran this command : npx prisma db push
hope this information helps people looking for solutions online.