The classic way:
import { readFile } from 'node:fs/promises'
const config = JSON.parse(await readFile('./config.json', 'utf8'))
Or import it like a module. Node 22 and newer need the attribute:
import config from './config.json' with { type: 'json' }
The import is cached, so if the file changes while the program runs you won't see it. Use readFile for anything that gets edited at runtime.