Since the tikz-feynman
package places nodes automatically (for which you need to compile the code with LuaLaTeX), you need to think about how to position them in a way that the result is as indended. But sometimes, this automatic placement does not really help much. For example, if you want to add the straight vertical line below the loop, it might be easier to add this later using regular TikZ commands.
An approach could be:
\documentclass[border=10pt]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\feynmandiagram[baseline=(b.base), horizontal=a to d]{
o -- [photon, reversed momentum'=\(\ell\), loop, min distance=2cm] o,
o -- [photon] a -- [scalar, reversed momentum=\(k_1\)] b,
c -- [scalar, reversed momentum=\(k_2\)] a,
o -- [photon] d -- [scalar, momentum=\(k_4\)] e,
f -- [scalar, momentum=\(k_3\)] d,
};
\end{document}
\documentclass[border=10pt]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}[baseline=(b.base)]
\begin{feynman}
\diagram[horizontal=b to e]{
a -- [scalar, momentum'=\(k_1\)] b
-- [scalar, momentum'=\(k_2\)] c,
d -- [scalar, momentum=\(k_3\)] e
-- [scalar, momentum=\(k_4\)] f,
b -- [photon] e
};
\coordinate (o) at ($(b)!0.5!(e)$);
\coordinate (p) at ($(o)+(0,1)$);
\draw[photon] (o) -- (p)
edge[photon, reversed momentum'=\(\ell\), loop, min distance=2cm] (p);
\end{feynman}
\end{tikzpicture}
\end{document}