"Sort of plagiarizing"? Plagiarism is one of those all-or-nothing things, either you did or you didn't. How much of someone's work you stole can vary but most of the time doing it at all is the problem.
Apologize to the teacher. Explain why you chose to plagiarise. Explain that your zero grade made it painfully clear what a bad thing it was to do. Ask if you can take a make-up test or do some sort of make-up project. Ask for coaching to help you get better at writing the important ideas from someone else's writing instead of plagiarizing it.
Never plagiarize (steal writing work) - if you get away with it - you will tend to do this again and again out of habit. You are ultimately cheating yourself out of your education. There are more severe penalties as you get higher in education or even business - expulsion, charges of academic fraud, or even copyright infringement (which can get you a stiff financial penalty).