I received an allegation of academic misconduct from my university. What should I do?
In a comment, you write that the professor had written in an email regarding the exam:

you will not have enough time to finish the exam if you spend a lot of time looking through your notes

This email is absolutely key. Quote the full email in your statement (including the date and timestamp), and highlight this sentence. It immediately implies that you were assumed and allowed to use notes.
The next point is that the professor apparently did not place any restrictions on what could be in your notes. (Did they?) Point this out.
The next exhibit should be that is was apparently easy to find practice questions that turned out to be similar to questions on the exam.
Nobody can hold it against you if you used the internet in researching what might come up in the exam, and in preparing your notes. (Yes, it would be better to reformulate your notes in your own words. Do this next time. You learn more that way.)
That should already be enough of an argument to rebut the accusation. Here is the structure of the argument I would propose:

You were allowed to use notes. Quote the email.
No restrictions on the notes were given.
You worked practice questions from various sources, e.g., from the internet. Quote the practice question, include if possible the link and a screenshot.
For one practice question, you used an answer you found online and put this in your notes. Again, include the link to the answer and a screenshot. Possibly include a copy of your notes.
One question on the exam was very similar to this practice question. Quote the question on the exam, perhaps highlight the similarities.
Therefore, it is not surprising that your answer matches something found in the internet.

Write this up in a short succinct way. Use paragraph breaks between the arguments. Don't ramble. Make this a short document of two pages at most.
If there is any sanity at your school, this accusation will be dropped immediately, and the professor will get some friendly advice about what to expect if they use questions on the exam that match questions that diligent students might find online while preparing.