tl;dr
This is because:
- Inflation is among other variables determined both by money supply, and supply constraints (constraints on real output).
- Nominal interest rate hike depresses output in the short run, not in the long run. Moreover, the mechanism of action there is that nominal interest rates affect the aggregate demand in the economy, not really aggregate supply directly. If aggregate demand in an economy is already so high that it is larger than long run productive capacity of an economy then its effect on output will not be large.
Consequently, increasing interest rates can help reduce inflation (although this is not to say that it might also not have some other unpleasant consequences).
full answer
This is because inflation is caused by increases of money supply, beside being also affected by supply (and several other variables).
Inflation is by definition positive change in money supply, and the money supply is given by the equilibrium at money market. Money market equilibrium can be modeled in several ways (with different degree of complexity). One of the simplest ways to model it the equation of exchange (see Mankiw Macroeconomics pp 87), which says that:
$$MV=PY \implies P=\frac{MV}{Y} \tag{*}$$
Where $P$ is price level, $V$ velocity of money, and $Y$ real output. Supply constraint, is just an another way of saying $Y$ is fixed, and if $Y$ is fixed, and $M$ is increasing, and $V$ does not change to counter the increase in $M$ you will get inflation.
So restricting money supply would help to decrease inflation, despite that it is fair to say inflation is caused by supply constraints, since real output is determined by aggregate supply and demand.
Furthermore, even though the model presented above is gross oversimplification more nuanced models have more or less same message. For example, more complex model of money market equilibrium is given by
$$M/P=L(Y,i) \implies P = M/L(Y,i) \tag{1}$$
where $L$ is the money demand which increases with $Y$ and decreases with $i$ (interest rate) and if you solve for $P$ you see that the message is essentially the same, if $Y$ and $i$ are fixed (so L does not change) increase in $M$ increases $P$. Additionally, you can see in this more complex model that hike in the interest rate would directly decrease $P$ (ceteris paribus), so interest rates can definitely be used to control inflation (provided there is a will for, interest rate hikes can have also some negative effects on economy as well so there is a trade-off there).
Next, one could also add on top of this further layers of complexities by including peoples expectations (expectations of what $M$ or $Y$ etc are, can be often even more important than the actual values themselves), and by explicitly modeling how $Y$ is being determined by interaction of aggregate supply and demand, $M$ by monetary policy and private banks that respond to it and so on. You can see more nuanced discussion and overview of more detailed models in graduate texts such as Woodford Interest and Prices, Wickens Macroeconomic Theory or Walsh Monetary Theory and Policy).
You are also right that, increase in interest rate and contraction of money supply would ordinarily suppress output, since on a goods market output is determined (in closed economy) by:
$$Y = C(Y,T)+I(Y,i)+G \tag{2}$$
where $C$ is consumption $T$ taxes, $I$ investment and $G$ government spending.
However, there is an added layer of complexity to this. The equation 1 and 2 together basically gives you aggregate demand of the economy (if you plug 2 into 1 you will get aggregate demand). The aggregate demand will be given by some function such that $Y= Y(M/P, G, T)$ where aggregate demand increases with $M/P$ (also corollary to this is that AD decreases with $P$, which should hopefully make sense, because if things get more expensive you expect people to buy less) and $G$ and it decreases with $T$.
However, even as a layman you might understand that in order to know what the production of an economy will be it is not sufficient to just look at what the demand is but also what the supply of an economy is.
When it comes to aggregate supply, it is important between distinguishing aggregate supply in a short run and long run. In a short run aggregate supply will be function of not just technology and availability of resources etc (expressed by catch all factor $z$) but also aggregate prices $P$. Hence in a short $Y_s=f(P,z)$, this is because in the short run people might be willing to supply more resources to the market when prices increase. In turn prices depend on $M$, $Y$ itself and also on $i$ (recall equation 1) so loose monetary policy can lead to more output in a short run (at the cost of increase in $P$ and thus inflation) and conversely tight monetary policy to even less output.
However, no matter what the price level is any economy is ultimately constrained by long run aggregate supply which represents the actual long run sustainable production capacity of an economy (simple example: if an economy has 100 units of labor and 100 units of capital and given its technological state output is given by $F=2\sqrt{L}\sqrt{K}$ then no matter what, output cannot physically exceed $2\sqrt{100}\sqrt{100}=200$). Thus output of an economy is ultimately in a long run determined by its productive capacity.
As a consequence of this, in the long run it does not really matter whether monetary policy is loose or tight, the output will be basically exogenously given by the production capacity of the economy, regardless of what the monetary variables are (in a long run money is neutral following the classical dichotomy). In a long run, loose monetary policy can only shift $P$ up, and conversely tight monetary policy can shift $P$ down but $Y$ will be determined by available resources and technology.
As a consequence, it would be possible to constrain inflation via interest rate hikes and monetary policy, even though it might temporary lead to lower output.