You will need to configure entity access rules with XPath constraints for that. You can find the documentation here and the learning path here.
I would follow this learning path if I where you: https://academy.mendix.com/link/path/9/Configure-Advanced-Security as stated by Rom.
And check out this documentation https://docs.mendix.com/refguide/xpath-keywords-and-system-variables how to use current user or current object.
Regards,
Ronald