Restrictions help to define a context. Models are usually created to enable predictions to be made. A model may be derived empirically, that is, based on past experience and experiments. So the model is usually an approximation, because it is not possible to include all factors or influences, especially if there is a degree of randomness. Weather and similar models are an example—prediction of rainfall, seismic activity, etc.
The current pandemic is an example of modelling. There are known and unknown factors—probably far too many to cater for in a function, which needs to be relatively simple. So if R is the reproduction or re-infection factor for a virus (the ratio of one person infecting others), a simple exponential function can be used to predict future infections from a starting point. So the domain may be restricted to whole days, or whole weeks, etc. That means the domain is integers rather than continuous, starting at a time t=0. The range has a starting point, perhaps a population count at t=0. Past models can be examined to judge effectiveness or non-effectiveness, over a limited period of time. The model may be useful for later prediction models with a restricted time period.
Other prediction models examples are appreciation or depreciation of value over time (precious metals and stones, money, inflation or deflation, vehicles, property, etc.), usually exponential; population growth of bacteria or people, etc., also exponential or cyclic.
(A mortgage function is NOT a model, because the function can be expressed. In exact mathematical terms based on an initial principal, a fixed interest rate and a time period. In this case the mathematics dictates details about payment.
Mathematics can also predict eclipses and other celestial events from science-based mathematical functions that contain no unknowns, or perhaps understood unknowns that are not expected to have any significant effects.)