Hi Vyshnav,
You can stop the simulink model using the stop command. Alternately, you can simulate the model step-by-step.
If you want to stop the model when a condition is met, you can program your model to do so as well.
Example: You can then connect the output of a conditional block to the Stop Simulation block. The simulation stops when condition is met.
If this doesn't work, please share your model so that we can investigate it further.