On page 9 of Folland's Real Analysis book we can read:
0.17 Proposition. If $X$ and $Y$ are well-ordered, then either $X$ is order isomorphic to $Y$, or $X$ is order isomorphic to an initial segment in $Y$, or $Y$ is order isomorphic to an initial segment in $X$.
Proof. Consider the set $\mathcal{F}$ of order ismorphisms whose domains are initial segments in $X$ or $X$ itself and whose ranges are initial segments in $Y$ or $Y$ itself. $\mathcal{F}$ is nonempty since the unique $f:\{\inf X\}\to\{\inf Y\}$ belongs to $\mathcal{F}$, and $\mathcal{F}$ is partially ordered by inclusion (its members being regarded as subsets of $X\times Y$). An application of Zorn's lemma shows that $\mathcal{F}$ has a maximal element $f$ with (say) domain $A$ and range $B$. If $A=I_x$ and $B=I_y$, then $A\cup\{x\}$ and $B\cup\{y\}$ are again initial segments of $X$ and $Y$, and $f$ could be extended by setting $f(x)=y$, contradicting maximality. Hence either $A=X$ or $B=Y$ (or both), and the result follows.
Are the following details regarding the application of Zorn's lemma correct?
Let $\mathcal{C}$ be a nonempty chain in $\mathcal{F}$ and let $g=\bigcup_{f\in\mathcal{C}} f$. The fact that $\mathcal{C}$ is a chain implies that $g$ is a well-defined function with domain $\text{dom}(g)=\bigcup_{f\in\mathcal{C}} \text{dom}(f)$ and range $\text{rng}(g)=\bigcup_{f\in\mathcal{C}} \text{rng}(f)$. By proposition 0.16 in the book $\text{dom}(g)$ is either an initial segment of $X$ or $X$ itself, and similarly for $\text{rng}(g)$ . The fact that $\mathcal{C}$ is a chain also implies that $g$ is order preserving and hence injective. We conclude that $g\in\mathcal{F}$ and, since $f\subset g$ for all $f\in\mathcal{C}$, $g$ is an upper bound for $\mathcal{C}$. It follows from Zorn's lemma that $\mathcal{F}$ has a maximal element.