Housing market cools due to inflation and higher mortgage rates