Hello, brother! There's no 'best' way to take notes when studying scripture, but I'll share what I do and why, and hopefully you will find that helpful. Making notes is a really useful way to remember the important parts of our time in Scripture, but also an effective tool for studying it while trying to work out what the important bits are, but remember that you're aim is to know God better to be able to better serve and glorify Him, not make a good set of notes.
Pray to God for His Sprit to help, then read the passage that you're looking at yourself, noting what you think the important bits are; the structure, the themes, the relation to the book, to the bible as a whole, etc. Answers to the standard bible study questions: what was the authors purpose in writing this? What is the main point he is trying to get across? What does this tell me about the character of God? etc.
Having made notes of your own thoughts and answered a few general questions, it's really helpful and important to note what questions you still have, and reflect upon what you have understood. You're never going to know God entirely, but to keep on growing in godliness you need to know what you are still unsure of, and what new things you are learning.
At this point I used to jump straight in to the notes to find answers to my questions, but after a while I stopped doing this, found this very unrewarding, as I wasn't really grappling with scripture or learning how to read scripture well, I was just looking up answers. In the long run this is extremely damaging, because you aren't learning how to read Scripture and come closer to God; there will be a time when the answer won't be in the study notes, and you won't know what to do. For example, I am currently reading the epistle of James, and am trying to deeply understand the section of the tongue; instead of just diving into the notes for answers, I'm trying to think for myself: why has he used the analogies he has? What do they have in common? Is there anything in the similarity of its study of duality with Romans 7? What does it mean to be controlled by your tongue? How does it relate to our Lord's words on what defiles us coming out of us? How am I stumbling in what I say? etc.
Instead of looking up 'the answers', go away and think about your unanswered questions yourself: praying and meditating. Make notes of any thoughts you have. It is only after asking God for wisdom (see James 1) that we should turn to secondary sources: ask a respected Christian; a friend or your vicar/priest/pastor, talk about them, looks at the study notes. You are now able to make another round of notes.
The study notes found in bibles such as the ESV study bible aren't as in depth as a true commentary; I'll frequently find that if I am looking to the notes for answers, my own meditations and prayers having still not found a satisfactory conclusion, then the study notes will usually just be a start in the right direction rather than a definitive end. They are particularly good at pointing out features in the original language, or parallels with other parts of scripture, that I did not know of; these are the parts I often find myself writing down and remembering.
TL;DR: First pray and read scripture, then write questions and initial thoughts. Then pray and meditate on questions you have and what you've learnt. Makes notes on these reflections. Then read and make notes on the study notes/commentary/other sources.
If there's any other way I can help, please let me know. It would also be good to ask someone you look up to at your church for advice on how to study scripture effectively, and maybe do it together; meeting up with brothers can be a real encouragement, and it's often helpful to talk through ideas and thoughts with another person (its also a great way to check you haven't wildly misunderstood something). I'll be praying for fruitful time in the Scriptures for you, friend.