Hola Aurea,
Responderé a tu pregunta en inglés
In order to model contact between gears or other solid body, you can use Simscape Multibody within Simulink, here is a link that would help you get started with the same:
You can refer the following documentation for getting to know more about modelling gears with Simscape Multibody:
And if you are interested in "Modeling Contact Force Between Two Solids" you can refer the following documentation:
hope it helps.