Before refrigerators, people had ice boxes. Ice was “harvested” from lakes and ponds in the winer and stored in ice houses. https://www.youtube.com/watch?v=F2aYFFNs8yY
People could go to the ice house and buy blocks of ice for their ice boxes, or you could have it delivered. Mechanical refrigeration has been a tremendous benefit to civilization. Read more of history here.