My image is leaving a gap through the whole page, here is my code:
\documentclass[12pt,a4paper,notitlepage]{book}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{graphicx}
\newcommand\fixedalign{\hspace{0.5\linewidth} & \hspace{0.5\linewidth} \nonumber \[-\baselineskip]}
\begin{document}
\begin{wrapfigure}{R}{0.4\textwidth}
\includegraphics[width=0.4\textwidth]{examples-examples.jpg}
\label{fig:example_graph}
\caption{dfxdxkjfrgbdxjhb guijchbg jrcb g dxhjgmhbjfbgdm xg dxjgbjmdxbx jgexmdgjx ymgsjdxuygh esjdrg ddjshx ujsegyrj hgxddj ghsmdx djx ygsjdxy gmesjy gaku esr aeyr aerhkjaekrit iea urhuarhku}
\end{wrapfigure}
\subsection{hjbmbjbjj kiihiki,l}
\subsubsection{iiihkihuhi 827883} % make a command
kbhhfj:
$$3233 31 4 331 32 2313$$
zxdfg, ahgvcsgdc 3 gyg uu tgff jkfddvfxjn,d xfk j kjfskjsbkfdjdbs z bj sfkjzkdnkzjjn k zj ks form fhddz hbdjazs,bhszzszj
\begin{align} %\fixedalign
3232434242 3142 4321 14324&31 \
5353253235 53 & 4353425234234\
4221244 423421412 4213412 &424421 1212 \
4421424121423 4123142 &4324424343432432\
\end{align}
3241412332 tgfgfd gx nfhfdg gfgfx bgfc gf gfb ccgf cvcbbcvbbcvvbbfrgf fs dg sfgafygagyregryvc craywkcrjscr
$$32413243421 42 42142143 333 3 43 43 3 3$$
\subsubsection*{Example 1.1.2}
rggdd:
$$fgfggfg324342313421$$
\begin{align}\fixedalign
424224 &234343233 \
2342414124v 5412412 & 22312332413412 \
3234342 & 4224142 3241314132 1122121 \
\end{align}
32414gd gh g hfgsh ghg shghd sg asgh g shsg hgh hgfs
sh gshsg hghsghs
g shgshhgsgsh tswhhhhhhhhhhhgggggggggggggggggggggggggshfg
\end{document}
![[1]: https://i.stack.imgur.com/L7Fuh.png](../../images/93b1ef0bae68578eb0a10e1195fad75c.webp)

example imagesas explained here: Example images in LaTeX? – AndréC Jul 25 '20 at 11:52