Lock parts of a mesh

Hello,
I have a model that I would like to work on in sculpting mode. I also need so subdivide the surface. The problem is that some parts of the model need to be mechanically accurate and should not change under any circumstance.
Is there any way of locking certain surfaces or parts of the model? Or will I have to sculpt and then cut out the accurate parts afterwards?
Thanks
Kind regards

For that you can use
https://docs.blender.org/manual/en/latest/sculpt_paint/sculpting/editing/mask.html

Thanks for the reply. It works partly. If I click on the object with the mask brush it just fades the a small part. Even if I set the strength to 1. I have to click several dozen times and wiggle the mouse for anything to happen. I would have expected that it just would applie the mask if I set the strength to 1. Seems a very strange behavior.