Locke probably got it from Cantillon (who made a fortune out of John Law's system, how ironic), but this reference probably summarizes the biggest mistake neoclassical economists have been making, ignoring what happened between the 18th century and the 20th one: the Industrial Revolution.
In a pre-industrial economy, the total economic output is essentially fixed (crop production, which makes the vast majority of the economic output, mostly depends on the weather) and supply is always the decisive factor in an economy.
In industrial economies however the economic output mostly depends on the demand: if there's demand for something, then the industries will just ramp-up production to fit the demand (be it for smartphones or aircraft carriers like in WWII). In this regime, you don't really have monetary-induced inflation, until the industrial output can't follow for some reason (in most cases, the output in actually decreasing, meaning that stopping money emission won't solve the issue either, and you need to actively contract the economy to curtail inflation (like Volcker did after the oil shocks) or just slow it down a bit to wait until the problem sorts itself out, à la Jerome Powell).