There are two separate things you want to take away from a proof, and they should be the focus of your study.
The first important takeaway from a proof is the driving idea (or ideas) that make the proof work. You should generally be able to express these ideas using as much ordinary language as possible. As an example, I will consider the theorem that the uniform limit $f$ of a sequence of continuous functions $$f_n : D \subseteq \mathbb{R} \rightarrow \mathbb{R}$$ is continuous. (This can actually be considered as a special case of a more general theorem, but that's no matter here.)
The driving idea behind the proof is to use the triangle inequality to bound $$|f(x) - f(x_0)|\, \text{ by } \,|f(x) - f_N(x)| + |f_N(x) - f_N(x_0)| + |f_N(x_0) - f(x_0)|$$ for all $x$ in a suitable disk of radius $\delta$ centered at $x_0$ using a suitably large choice of $N$.
The three terms in the latter summand can be made less than $\epsilon/3$ because $f_n$ converges to $f$ uniformly, $f_N$ is continuous, and $f_N(x_0)$ converges point-wise to $f(x_0)$, respectively. Note that this part of understanding a proof is creative and requires understanding the subject in a greater context.
The second important takeaway from a proof is how to turn the driving idea of the proof into a rigorous argument. In the example above, this is where you manipulate $\epsilon$'s and $\delta$'s and $N$'s appropriately, carefully considering the order of quantifiers and what depends on what. Note that this part of understanding a proof is technical and can be improved upon with constant practice.
When you are first learning proofs, the second part can be very challenging. The more experience you get, the more you will come to realize that the first part is the generally harder part for discovering a new theorem. The second part can largely be automated, but the first part requires a genuine insight. (Constructing new proofs is actually a bit more complex than that. Generally, one comes with lots of potential strategies for a proof, then analyzes whether they can be turned into rigorous proofs. Often, there is a gap in the argument, and then one must go back to the creative stage and figure out a way to close the gap or a new approach to the proof.)
Of your two options, the second one is the one that will help you to learn how to approach proofs successfully. Focus on understanding the big picture and then on how to turn those ideas into rigorous arguments. Don't memorize proofs line-by-line. It's important that your goal should be to understand the proof, not to merely be able to recite it.