As per my understanding, for 1D contact problems where only viscous friction is present, the hardstop block may be sufficient. However, for 2D and 3D problems or if the friction force depends on the normal force, I recommend looking at the File Exchange submissionSimscape Multibody Contact Forces Library. It contains a library of blocks for use with Simscape Multibody that detect collision between various shapes, calculates the normal force and friction force on each part, and applies them to the colliding parts.
Simscape Multibody Contact Forces Library is one of the several submissions in MATLAB File Exchange on MATLAB Central which is a forum for our product users to interact, exchange information and knowledge, without MathWorks' involvement. Feel free to contact the author of this submission directly for specific questions about the implementation.