There isn’t a ‘best practice’ for locking since the requirements, and hence the solutions vary widely from one application to another.
But you should consider optimistic locking as a first step.
If optimistic locking is not sufficient for your needs then there is an app store module that you can use to help you build a pessimistic locking solution here
https://appstore.home.mendix.com/link/app/109405/