Remember that there's a survivorshio bias in the 100 year old buildings you see still standing today. In many cases they are impractical for modern standards too - my home has 2ft thick external sandstone walls, and all the internal walls are brick. It's massively overengineered for the use of the building.
At the same time there is nowhere to put any insulation on external walls meaning that during the winter were leaking huge amounts of heat and during the summer we live in an oven. Compare that to my friends modern new build in the same city (Edinburgh) their internal temperature is mostly stable.
There's also things like "you can't run any extra cabling"- adding ethernet to my existing cabling isn't happening without replastering my entire home. And lets not start with modern 5GHz WiFi not passing through my internal walls.
Needs have changed, materials are more consistent and easier to get, efficiency standards have changed. All of these things have had a huge impact on materials and costs. It's unfair to just say that buildings are built worse without considering anything else.