Model-based specification is like playing with blocks. Imagine you have a big box of different sized and shaped blocks. You want to build a structure that is the tallest and most stable. But you don't know how to build it yet.
So, before you start building, you draw a picture of what you want to make. This is called a model. In this case, your model could be a tall tower made of blocks that is wider at the bottom and narrower at the top.
With your model in hand, you start building your tower. You follow the model closely, putting the blocks together in the exact way you drew them. This is called the specification.
If you follow the model carefully, your tower should turn out just like the picture. It will be tall, stable and exactly what you wanted it to be!
In the same way, model-based specification is used in computer programming to make sure that the software a programmer wants to build is exactly what they intend it to be. The programmer creates a model of the software before they start coding. Then they use this model to guide how they write the code. If they follow the model closely, just like building a tower with blocks, the software will turn out exactly as they intended it to.