Goto https://www.npmjs.com/package/ethers
Install the NPM package that is listed on that above link provided by NPM.
Create a file, or project, or run through cmd (depending on how you want to test this).
Add the following code:
const ethers = require('ethers');
const wallet = ethers.Wallet.createRandom();
console.log('address:', wallet.address);
console.log('mnemonic:', wallet.mnemonic.phrase);
console.log('privateKey:', wallet.privateKey);
Please read the docs they have provided: https://ethers.org/