Worldshaker by Robert Harland

Aboard a colossal steam-powered juggernaut that roams the world, a privileged heir groomed to command has his beliefs shattered when he shelters a fugitive from the oppressed underclass; as he uncovers grim truths about the ruling elite and the exploitation below decks, he must confront his family’s legacy and choose between loyalty and justice, risking everything to spark a rebellion that could reshape their moving city.