I think the problem is because you wrap the regular expression in ``, which is understood as a string. You can try this way:
const queryWordRegex = new RegExp(body.queryWord, "i");const query = {$or: [ { name: { $regex: queryWordRegex } }, { description: { $regex: queryWordRegex } }, ],};