Rent had been extremely low for a long while. Much less than mortgage and a smaller fraction of the tenant's income. 20 years ago it was generally 40x rule: 40 times monthly rent should not be grater than the gross income or, alternatively, rent should not exceed 30% of gross income. 10 years ago many landlords switched to 25% and, even, of the net income in some cases.
This had been supported by the rapid capital gains: when your house appreciates more than its payment every month any rent you can collect on it is pure profit. It's gone now and the rent again has to pay the mortgage+insurance+taxes+maintenance on the greatly appreciated property. Building more a year ago was expensive because of shortages of everything from labor to raw materials. Lumber used to be more expensive than steel, which also was not cheap. So anything that had been built then cannot really be rented cheaply because the units are expensive. Building more now is expensive because the shortages are still there, prices of everything are up because of inflation and, most importantly, credit is expensive so everything that is being built now cannot be rented cheaply too because units are still more expensive and the credit is much more expensive.
The market works but it's never been intended to protect you from the economy being ran into the ground.