No. That is not the only way... Alternatives include: charging more interest on loans then on savings, charging service fees for each transaction. Also just think about this for a second. If the economy keeps growing (which is what inflation really is) more people will have more money, they would want to keep that money somewhere. They put it in a savings account. The bank now has more money to pay more interests.
We don’t need the stock market.