The Mac speakers are louder on a physical level, but the iPhone X (and 8/8+) have a broader frequency range into the low end. The way we hear sound makes lower frequencies sound louder at a high volume, compared to midrange frequencies, so the X sounds louder. The same thing happens to me when comparing my 2015 13” and my 8+