As you can see in the immage I attached, the code produces the diagram correctly, yet not where I'd like it to be, i.e. below the first line of text (the second line was just a test)
\documentclass[lualatex]{beamer}
\usepackage{graphicx}
\usepackage{tikz-feynman}
\begin{frame}
\frametitle{Involved Feynman diagrams}
At LO in $\alpha$ there is only one diagram:
\begin{figure}[!h]
\begin{tikzpicture}
\feynmandiagram[horizontal=a to b]{
i1 [particle=\(e^{-}\)] -- [fermion] a -- [fermion] i2 [particle=\(e^{+}\)],
a -- [photon] b,
f1 [particle=\(\mu^{-}\)] -- [fermion] b -- [fermion] f2 [particle=\(\mu^{+}\)],
};
\end{tikzpicture}
\end{figure}
prova
\end{frame}
Any help would be much appreciated. Thank you.
Edit: possibly useful information, compiling with lualatex
\begin{figure}
and\end{figure}
\begin{tikzpicture}...\end{tikzpicture}
.\feynmandiagram
is already a tikzpicture