Hi @Naw_Ing and welcome to the community forum.
If you wish to get a random document from the collection, you can make use of the $sample operator to get specified number of documents.
For example, if you wish to get only one random document, you can write your query as:
db.collection.aggregate([{ $sample: { size: 1 } }])
Please let us know if you have any further questions.
Best Regards
Aasawari