Does printing more money necessarily lead to inflation? For instance, if the money supply increased, but the money just sat around and wasn’t distributed to people, would that still cause inflation? It seems like prices only increase when the amount of money consumers have also increases. But if the money printed isn’t given to the consumers, I can’t see why prices would increase
No it is not necessary. First trivially if you print money on money printer and immediately from the printer you will shovel the money into huge pit and then cover the pit by tar it would have no effect on the economy whatsoever.
Next, less trivially inflation depends on not just money supply but also money demand. A simple model of money market equilibrium can be given by:
$$M/P=L(Y,i) \implies P=M/L(Y,i)$$
where $M$ is money supply, $P$ price level (positive change of which is inflation) and $L$ money demand that depends positively on real output $Y$ and negatively on the interest rates $i$.
No matter what the change of $M$ occurs as long as $Y$ or $i$ sufficiently change $L$ to offset change in price level there won't be inflation. Of course, while it is easy to increase money supply by extremely large amount, it is extremely hard to change productive capacity of an economy in real life. Most developed economies grow by 1-2% on average. Interest rate cannot be also chosen freely because there is effective lower bound under which it cannot fall, and while there is no upper bound, rising interest rate too high too quickly will negatively affect economy.
However, this not much to do with to whether the money are given to consumers or not. The money can be spent by the government, or they can be all invested, as long as the money circulate in the economy and don't just sit under the bed they will have some effect on price level. However, as mentioned above the effect could be offset by changes in other variables in the economy. Generally it simply does not matter where the money are spend (i.e. consumption, investment, government sending) although there might be special cases such as deep recessions for example.
This question is related to a very similar one asking if If no one knew about inflation, would inflation take place?.
Printing money is a more often than not a misnomer because most of the time central banks do not literally print money when they increase money supply. The FED for example isn't even in charge of printing physical money.
Most central banks buy securities, usually high quality liquid assets (mostly government bonds), and credit the amount to the reserves of the seller of the bond, which are big banks. If the banks literally would not do anything with this money, there would be no impact on inflation.
To some extent, that is also what happened in the last ~10 years, where the monetary base (what the central bank controls) increased significantly, but larger monetary aggregates did not change the growth trend much. This can be seen in the picture below from another answer which plots the monetary base, M1 and M2 (normalized to Dec 2005 = 100 for each series), and add shaded regions for the timing of the 3 phases of QE (details can be found in the link).
Largely for this reason (lack of it impact on real economy of traditional monetary policy), there were other ways created how banks can get liquidity, like the TLTRO programs in Europe for example. The amount (and interest rate) that banks can borrow is linked to their loans to non-financial corporations and households. This results in better transmission of monetary policy to the real economy.
That the terms for these existing TLTROs changed already twice is another issue that is not important here...