How to read just one line from a TXT file?

I’m creating a Wordle-like game and I need to create a dictionary in a TXT file. At the moment I’m just using a vector in my script.js file.

The idea is to have one word on each line like this:

ANGEL
APPLE
HELLO
...

I created the .txt and am reading it from my JS

import { readFile } from "fs"; 
readFile("dictionary.txt", "utf8", (err, data) => {
    if (err) {
      console.error(err);
      return;
    }
    const randomLine = lines[Math.floor(Math.random() * lines.length)];
    console.log(randomLine);
  });