Do I have to cite sources for my opinion when it was formed by reading other people's opinions? (undergraduate)
I would reexamine what you mean by "agree with my opinion." Consider for example:
Einstein proposed the Theory of Relativity, which has been widely accepted by the scientific community and has withstood a battery of experimental tests over the last century [cite]. I agree that this theory is correct.
This last sentence is a little bit ridiculous -- your opinion is altogether irrelevant (unless you are an esteemed physicist). The is true in other fields -- saying you, as a student (or even me, as a professional in a different field), agree or disagree with Mark Twain or Charles Darwin or Thomas Aquinas is almost comical.
On the other hand, facts are facts regardless of who says them, and you are entitled to an "academic opinion" even now. So consider, instead, this much stronger paragraph:
Newton's laws of kinematics were widely accepted for hundreds of years, and have been experimentally verified many times [cite, cite, cite]. However, Einstein's recent work argues that Newtonian kinematics does not apply at very high speeds [cite]. Recent work with cathode rays [cite] seems to support Einstein's findings.
So in this case, you are clearly arguing that Einstein is correct and Newton is wrong (i.e., "your opinion" is that you "agree" with Einstein), but you do it with facts and logical reasoning, without ever mentioning "agreement" or "opinions."
Now you had asked specifically about making a choice -- what to do when experts disagree. Even in these cases, you can present your analysis without ever mentioning "agreement" or "opinions." Consider:
"Jones argues A [cite] while Smith argues B [cite]. While there is no clear answer, Adams makes a compelling case for B [cite], noting that _. Indeed, in light of Adams' arguments (particularly his ontological argument), Jones' position seems wholly untenable.
In the above, it is clear that you "agree" with Adams and Smith, and your claim that Adams' case is "compelling" is very much an opinion (one that you will need to defend in the paper). But you never use the words "opinion" or "agree," and the citations take care of themselves.
Nor are you limited to discussing others' ideas; you can also raise your own ideas:
"Jones argues A [cite] while Smith argues B [cite]. While there is no clear answer, the only verifiable evidence is the exponentially rising CO2 levels. Recent results [cite] have only strengthened this body of evidence. Given the extraordinary success of this prediction, Smith's position seems superior to that of Jones.
In the second and third sentences above, you are presenting your own, novel ideas or analysis, and there is no need to cite anyone. Again, you are very clearly agreeing with Smith, and you very clearly have an opinion, but you never use those words, and the citations take care of themselves.
As you present this, it seems as if the answer is yes, you need to cite your sources, probably including those you don't agree with with as well.
Plagiarism is presenting the ideas of others as if they were your own. It is considered to be serious academic misconduct and most professors who recognize it in a student's paper will mark it down pretty severely if they accept the paper at all.
And, since you are an undergraduate, it might be especially important to get into the habit of this.
Note that you don't need to copy the words of others to commit plagiarism. It is about the ideas, not the specific words.
You can "weigh" the ideas of others to come to an original opinion, but you need to be specific about the sources.
And if you must err a bit on one side or the other, citing too much is not usually a problem, but citing too little always is. So, tend toward over citation, especially as you learn this stuff.
Example:
John Smith in the July 2020 issue of International Basket Weaving asserts ... A ... and gives the following reasons....
In contrast, Mary Jones in the April 2019 issue of the same journal suggests ... B ... and asserts...
I conclude that the correct solution is B because...
It is the things that follow "because" that are your contribution. It can include the weakness of A, the strength of B or other factors not considered by either.