@ManjuR
I'm getting a token back successfully using your code.
Ensure that you're encoding your credentials with base 64 for the Authorization header.
Here's a how-to for that: https://developer.genesys.cloud/api/rest/authorization/base-64-encoding
If that fails, and the credentials are valid, it will be something outside this code snippet that is causing the connection reset.
Not that I have much to add to what Jacob said
But reading your other post (works from postman web, not from postman desktop client), could it be that your enterprise has a proxy server for internet connections? Configured/enabled in your web browser (which would explain why postman web worked) and that you didn't take it into account in your postman desktop client configuration (and in your nodejs code).