Bible commentaries are invaluable for doing serious study of biblical texts.
Many older Bible commentaries are available online. You can find some of them at the Bible Hub website. Simply type in a Bible reference in the search box. Then click on the “Comment” tab, and Bible Hub will show you comments on that verse.
A comprehensive list of older commentaries that are available online is here: http://www.bible-researcher.com/links20.html. You can read these commentaries online or download them in pdf form.
To consult more up-to-date commentaries, you will have to go to a theological library or else purchase them. Commentaries can be purchased in print form. They can be purchased in digital form through Bible software companies such as Accordance, Logos or Wordsearch.
In deciding which commentaries to use or purchase, you may find it helpful to review an Annotated Old Testament Bibliography and a New Testament Exegesis Bibliography published by Denver Seminary. Also useful is a website called Best Commentaries. It has a page listing the two commentaries with the highest overall rating for each book of the Bible: https://www.bestcommentaries.com/topcommentaries/.
There are also a couple of books that survey recent commentaries and describe their strengths and weaknesses: Old Testament Commentary Survey by Tremper Longman and New Testament Commentary Survey by D. A. Carson. Consulting these books can save money in the long run by keeping you from purchasing commentaries that are not particularly helpful.