Physical insight can suggest a principle which in turn leads to mathematical modeling. Example might include Newton extending the falling of an apple to towards Earth’s center, to the Moon falling around the Earth, and Einstein’s free falling elevator compared to the effect of gravity.
But mathematics can also give a powerful clue to a physical principle. Well known examples include Planck's 1900 or so work on energy packets implying discontinuous amounts of energy, and Dirac’s prediction of the positron.
From 2005 to 2008 studying networks, I found that the mean path length successfully scaled a lexical network, and the mathematical result implied some physical principles about the distribution of energy in a network, which by a circuitous route led to the idea of the principle of dimensional capacity around 2019.
History, consistent with my own experience, suggests physical principles can imply the mathematics and vice versa.
Your views? Do you have examples of each?