You should add the queries field for the field you want to query against during the creation of the encrypted collection.
For ex:

  const encryptedFieldsMap = {
    encryptedFields: {
      fields: [
        {
          path: "email",
          bsonType: "string",
          queries: { queryType: "equality" },
        }
   }
}

In the above code, we’re telling mongodb that the encrypted field email would be queried by equality searches in the future.
If however you donot provide the queries field during the creation of encrypted collection, the error you mentioned could occur.