In backend->routes->user await User.updateOne(req.body, { id: req.userId }) res.json({ message: "Updated successfully" }) `updateOne` takes filter as the first argument and updated information as the second argument, but opposite is been done here.