Model.find is an asynchronous operation which needs to be awaited / continued by using .then() or passing callback:
.then()
const items = await Room.find(filter);
Try this code it should work
const filter = [ { users: new mongodb.ObjectID(uid1) }, { users: new mongodb.ObjectID(uid2) }]const items = Room.find({ $and: filter });