The endpoints of the edge $\{\color{red}{1}, \color{red}{4}\}$ are vertices $\color{red}{1}$ and $\color{red}{4}$. Miriam Briskman, CC BY-NC 4.0.
\documentclass[border=1pt]{standalone}
\usepackage{tikz}
\tikzset{
vertex/.style={draw, circle, very thick, minimum size=1cm},
edge/.style={very thick}
}
\begin{document}
\begin{tikzpicture}
\node[vertex, red, dotted] (v1) at (0,0) {1};
\node[vertex] (v2) at (3,0) {2};
\node[vertex] (v3) at (-2,-2.5) {3};
\node[vertex, red, dotted] (v4) at (2,-2.5) {4};
\node[vertex] (v5) at (5,-2.5) {5};
\draw[edge] (v1) -- (v2);
\draw[edge] (v1) -- (v3);
\draw[edge, red] (v1) -- (v4);
\draw[edge] (v2) -- (v5);
\end{tikzpicture}
\end{document}