Earthquakes can be like Jell-O. A simple, yet often used analogy is that if you’re sitting in a valley or basin, it acts like a bowl of gelatin and it will shake more than surrounding rock.
(SOURCE) https://www.cnn.com/2022/12/20/weather/earthquake-soil-rock-types-xpn/index.html