I am reading Set Theory from https://ocw.metu.edu.tr/pluginfile.php/99015/mod_resource/content/1/320lecturenotes.pdf . The author calls an ordinal number "cardinal" if it is not equipotent to any ordinal less than itself. For a set $X$, cardinality of $X$ is defined to be the unique cardinal equipotent to $X$.
Now, let $X$ and $Y$ be sets. I want to show that $|X|\le |Y|$ iff there is an injection from $X$ to $Y$.
Here is my attempt. ($\Rightarrow$) Let $\alpha =|X|$ and $\beta = |Y|$. Then by definition there are bijections $f: X\to \alpha$ and $g: Y \to \beta$. Since $\alpha \le \beta$, we have that $\alpha \subseteq \beta$ by definition of ordinals. Let $i_\alpha$ be the inclusion mapping of $\alpha$ into $\beta$. Then $g^{-1} \circ i_\alpha \circ f$ is an injection from $X$ to $Y$.
($\Leftarrow$) This is the part which I am unable to prove. Suppose that there is injection $h: X \to Y$.
After several failed attempts, I do not know how to finish the proof. Hints will be appreciated!
EDIT: I tried a proof. I would appreciate it someone can verify it!
Let $h: X\to Y$ be an injection. Let $g: Y \to |Y|$ be a bijection. Then $\text{ran} (g\circ h) $ is a subset of $|Y|$. So $\text{ran}(g\circ f)$ is a well ordered set with respect to its membership relation. Let $\gamma$ be the order type of $\text{ran} (g\circ h) $. Let $F$ be an order isomorphism from $\gamma$ to $\text{ran} (g\circ f)$ . So $F(\delta)\ge \delta$ for each $\delta < \gamma$. Consequently, $\delta \le |Y|$ for each $\delta < \gamma$. Hence, $\gamma\le |Y|$.
Since $|X|\le\gamma$ (because $X$ is equipotent to $\gamma$), we have that $|X|\le |Y|$.