It's quite clear for me how to generate a 12-24 seed phrase: straightforward with ethers.js
import { entropyToMnemonic } from "@ethersproject/hdnode"
// 16 bytes / 128 bits => 12 words
// 32 bytes / 256 bits => 24 words
const mnemonic = entropyToMnemonic(ethers.utils.randomBytes(32))
const wallet = ethers.Wallet.fromMnemonic(mnemonic) // wallet.privateKey
Now it's quite unclear how to derive wallets using 13th/25th word (12/24 words + passphrase)