Academic writers, journalists, book authors, and website content writers have to follow a style guide recommended by a professor, book/journal publisher, newspaper, or website owner.
A lot of book and journal publishers recommend formatting the draft as per the American Psychological Association (APA) or Modern Language Association (MLA) style guides. Moreover, most journalists follow Associated Press (AP) Stylebook guide.
The APA, MLA, and AP style guides recommend capitalization of the first and last words in headings and titles as well as nouns, pronouns, verbs, adverbs, and adjectives.
APA and AP recommend the use of lowercase for articles, prepositions and conjunctions that are three or fewer words in a heading/title, such as of, to, the, and, etc.
MLA rules are different in that lowercase must be used for both short and long prepositions and conjunctions that are more than three words like between and against.
In the end, remember that there are no hard and fast rules regarding headings and titles. The preposition in both the titles you have mentioned mean the same thing. You can write headings/titles in either lowercase or uppercase. But you must be consistent in your formatting.