By definition of Heine theorem: Let $a$ be a real number, $∞$, or $−∞$. Assume that a function $f$ has a limit $L$ at $a$. Then for every sequence $\{a_n\}_{n=1}^\infty$ such that $\lim_{n\to \infty}${$a_n$} $= a$, (and $a_n ≠ a$) we have $\lim_{n\to \infty} f (a_n) = L$.
If I choose the number $a = 3$ and a function $f(x) = x^2$. I know the function has a limit $L = 9$ at point $3$. Now comes the part I don't understand when I choose a sequence that has a limit $\lim_{n\to \infty}${$a_n$} $= a = 3$ for example {$a_n$} = $3+\frac{1}{n}$ how would it make sence that $\lim_{n\to \infty}f (a_n) = L$? I understand that it works but I have no intuition why this should work. When I draw a graph of the sequence {$a_n$} = $3+\frac{1}{n}$, the function $f(x) = x^2$ and $f (a_n)$ = $(3+\frac{1}{n})^2$, all graphs look so different. Why should they have something in common? How could anyone get the idea that this works?
Thank you.

Ok, so I think the issue is your interpretation of the graph. Notice how the graph of $\{f(a_n)\}$ starts out at $n=1$ at a vertical value of $16$. This makes sense because $(3+\frac{1}{1})^2 = 16$. Then, notice how it decreases from $16$ and slowly flattens out to a value of $9$. This makes complete sense because \begin{align} \lim_{n\to \infty} \left(3+\frac{1}{n} \right)^2 = (3 + 0)^2 = 9 \end{align}
So, the graphs you've drawn do indeed support the theoretical prediction. I guess your confusion stems from the fact that the "shape" of the graphs look different, but that's not what you should be focusing on; instead, you should focus on the limiting value which the sequence approaches. The actual function $f(x) = x^2$ has the limit $9$ as $x \to 3$, and this is also what the sequence $\{f(a_n)\}$ shows.
Now, another way of describing convergence is via a sequence of functions. So, for each natural number $n$, define the function $f_n : \Bbb{R} \to \Bbb{R}$, by $f_n(x) = \left( x + \frac{1}{n}\right)^2$. Then, for various values of $n$, this is what the plot looks like:
The solid black line is when $n=1$, the dots is $n=3$, while the dashed lines is $n=10$. Note how as $n$ increases, the graphs approach the red graph (in a pointwise manner) which is the actual function $f(x) = x^2$.
Also, take a look at this Desmos plot and play around with various values of $n$.
The difference between the graph I showed and the one you did is just a matter of which variable is held fixed and which is varying. Note that for $(x+\frac{1}{n})^2$, we have two things we can vary, the natural number $n$ and the real number $x$.
To produce your graph of the sequence $\{f(a_n) = (3+ \frac{1}{n})\}_{n=1}^{\infty}$, what you did was keep $x$ fixed at the value $3$, and you allowed $n$ to vary from $1, 2, 3, \dots$. To produce the graph I made, you need to fix an integer $n$ and graph the function $f_n: \Bbb{R} \to \Bbb{R}$, defined by $f_n(x) = (x+\frac{1}{n})^2$. If you do this for each value of $n$, then you'll get a whole bunch of graphs of $f_1,f_2,f_3,\dots$ and the graphs get closer to the graph of $f$.
So, conceptually speaking, you need to be clear regarding which variable is being held fixed for the time being, which is varying etc (it may not be clear immediately, but you should spend some time on this).