If it is at all possible to draw a single vertical line through more than one point on the curve, then the graph is not a function. With graphs (2), (3) and (4), we can draw a vertical line through more than one point on those curves, so they aren't functions. Graph (1) is the only thing left. This graph is a function because it is not possible to draw a single vertical line through more than one point. It passes the vertical line test. Any input (x) leads to exactly one and only one y output.
Nice work on getting the correct answer when you chose "graph (1)".