I am taking my first analysis course in university. Since I am studying in Germany, there is no real distinction between calculus and real analysis, meaning this is the first university course on anything analysis that can be taken here. Therefore, I am new to the concepts of mathematical proofs. However, they are regularly used in the course and I often have problems following them. Since I am taking classes on mathematical principles and logic as well, my initial idea was to buy a dedicated textbook on proofs, e.g. Hammack's Book of Proof, Velleman's How to Prove It or Chartrand's Mathematical Proofs: A Transition to Advanced Mathematics, which I could use for analysis as well as the other classes.
However, some answers to this question imply that this might not be the best way to go and I should rather buy a book on a certain mathematical field, in my case analysis, that contains a rigorous introduction to proofs in itself and applies them. Additionally, since time is limited, I am not quite sure whether it makes sense to focus on a book on mathematical proofs (which sometimes have several hundred pages) rather than the course itself.
Since I am missing an introductory text to analysis anyway, I thought about following the recommendations in the answers and getting a book that teaches introductory analysis with a focus on formal notation as well as writing and understanding mathematical proofs. From what I have read so far, Abbott's Understanding Analysis and Tao's Analysis I + II might be great options for that purpose, however, one answer on the question I was referring to earlier suggests there might be a specific book which is specifically designed that way.
Should I get a separate book on mathematical proofs or would I be better off with one of the analysis books I mentioned (or a completely different one)?
Analysis $1$ by Tao has an appendix on the basics of mathematical logic. So you can first read that before you begin to attempt the exercises.
But before you read that appendix, I would advise you to read the first chapter(technically the second) of the book on the construction of the natural numbers. This is where you will get introduced to the Principle of mathematical induction and use that principle to prove many statements regarding the natural numbers such as addition and multiplication for natural numbers is commutative, associative and so on.
The only benefit of these introductory proof courses or books is that you won't be wasting time looking those things up again. For example, I didn't read the whole book "How to prove it" but only some of it. And I didn't know what the sentence "if and only if" meant in terms of proving a mathematical statement. I only understood it when I went to check if my proof was correct.
Honestly speaking, I only ever learnt all the things in proving mathematical statements by reading proofs in the book I was learning from and solutions for those exercises.