This is almost the same question as asked 2 days ago by you.
The answer is the same!
Try following the online course, your answer will follow.
You can check the Mendix reference guide for Xpath on this: https://docs.mendix.com/refguide/xpath
At the bottom of the page is a list of 'Constraint functions', that allow you to constrain your search, using for instance a value from an object (that you would pass to the microflow as an input parameter, but just as well can be retrieved calculated) in your microflow
You can also check the specific Mendix Learning module (https://gettingstarted.mendixcloud.com/link/path/3) that deals with creating proper, high performing retrieves :)