I have a problem with the environment wrapfigure because it makes a lot more space even after there is no image.
Here is an image of the problem:
And here is the code:
\begin{wrapfigure}{l}{0.4\textwidth}
\centering
\vspace{-0.15cm}
\includegraphics[width=0.35 \textwidth]{example-image-a}
\caption{A mayor temperatura la emisión de radiación del cuerpo negro se dispara hacia longitudes menores acercándose al visible}
\label{fig:my_label}
\end{wrapfigure}
If someone could help that would be incredible thank you.

wrapfigurerequires manual adjustments after the text contents are fixed. It is somehow inevitable. – Teddy van Jerry Sep 22 '22 at 15:41wrapfigurewith the plain TeX macro\InsertBoxL(orInsertBoxRif you prefer), frominsbox. – Bernard Sep 22 '22 at 16:23wrapfigurewhen the contents overflow the frame and the whole page arrangement got messed up. I reckon it is because the inner calculation mechanism ofwrapfigure. Therefore, you need to void this kink of overflow and keep the figure strictly within the page frame. They are the adjustments you need after fixing the text contents. – Teddy van Jerry Sep 22 '22 at 16:40texdoc wrapfig, the manual is short but clear about the idiosyncrasies of this environment. Pay attention specially to the "Placement and Floating" in page 2. BTW, depending on your contents and taste, if you planned use several wrapped figures, consider avoid that and use a two column layout (or the tufte-book class, if you need a wider main text for equations or whatever). – Fran Sep 23 '22 at 00:05texdoc tufte. – Fran Sep 23 '22 at 08:20