MLA or APA?
Use MLA style for classes in the humanities or if your instructor recommends it.
Use APA style for classes in the social sciences of if your instructor recommends it.
Purpose of the bibliographies
There is an obvious reason to write a bibliography: To avoid plagiarism. But there is another abstract reason related to the academic conversation.
Scholars communicate with each other by publishing papers. This is how they contribute to the academic conversation.
When you are a student, you are part of the academic community, and your work is a contribution.
Your bibliography is an expected part of the academic conversation, and it shows other people what you have researched to form your thoughts.
By acknowledging your sources, you are finding your place within the academic conversation as a contributor.