Find or findOne returns empty array when parameters are passed but it works in mongo shell

I’m using mongoDB 4.4.3 and mongoose 5.10.8 and mac OS catalina

Can anyone help me with the error in the below code why find or findOne is returning empty array when a parameter is passed when it has data in database. When i queried vis mongo shell find and find one returns value. Only when parameter is passed it is not returning value but it returns value for find and find one with no parameter passed why??? what mistake???

const mongoose = require('mongoose');
const Schema = new mongoose.Schema({
        categoryName: {
            type: String,
            trim: true
        },
        subcategory: [ {
          
            subcategoryName: {
                type: String,
                trim: true
            }]
});

 module.exports = mongoose.model('categories', Schema);

controller code:

const categories = require('../models/category');
exports.getCategory = (req, res, next) => {

categories.find({"categoryName":{ $regex: req.params.id, $options: 'i' }},(err, products) => {
   console.log("Products:"+JSON.stringify(products));
  if (err) {
         return res.status(400).json({
           error: "No Products found"+err
         });
       }
       res.status(200).json(products)
     });
};

routes code:

const categoryCtrl = require('../controllers/category'); routes.get('/category/getCategory/:id', categoryCtrl.getCategory);

GET call URL via postman:

http://localhost:3000/category/getCategory/“Fruits”

Any mistakes in my code i need help on this