Database
[{_id:0,dateOfBirth:new Date("1980-01-01")},{_id:1,dateOfBirth:new Date("1985-01-01")},{_id:2,dateOfBirth:new Date("1990-01-01")},{_id:3,dateOfBirth:new Date("1995-01-01")},{_id:4,dateOfBirth:new Date("2000-01-01")},{_id:5,dateOfBirth:new Date("2005-01-01")},{_id:6,dateOfBirth:new Date("2010-01-01")},{_id:7,dateOfBirth:new Date("2015-01-01")},{_id:8,dateOfBirth:new Date("2020-01-01")}]
Query
db.collection.find({$expr:{$let:{vars:{age:{$dateDiff:{startDate:"$dateOfBirth",endDate:"$$NOW",unit:"year"}}},in:{$and:[{$gte:["$$age",18]},{$lte:["$$age",35]}]}}}})