This is a question of style, and so different publishers may have different rules regarding this. Indeed, as we will see below, examples of both of Course and Of Course exist in published literature. (But it is unlikely any publisher would have it as of course, leaving both in lowercase.)
Having said that, it seems that most publishers and most major styles would have it as of Course.
The Chicago Manual of Style
The Chicago Manual of Style (CMoS) says that one should
Lowercase prepositions, regardless of length, except when they are used adverbially or adjectivally (up in Look Up, down in Turn Down, on in The On Button, to in Come To, etc.) or when they compose part of a Latin expression used adjectivally or adverbially (De Facto, In Vitro, etc.).
(8.159: Principles of headline-style capitalization)
(Of course, one should also capitalize prepositions if they are the first or the last word in the title or subtitle.)
Now, the of in of course is idiomatic; the word of doesn't quite function in an ordinary way. But arguably we can at least say that it doesn't function either adverbially or adjectivally (look at the examples above). Moreover, etymologically, it comes from the phrase of the ordinary course (see here), where it functions as a perfectly ordinary preposition. Thus, it would seem that CMoS would recommend that of be lowercased.
(And as far as the word course, that's a noun, so CMoS would have it uppercased.)
The Associated Press Stylebook 2019
From my experience with manuals of styles, when it comes to 'basic' matters such as spelling, capitalization, punctuation, etc., most manuals tend to agree with CMoS. (The biggest differences among manuals are usually in how they handle citations and references. Another place where they tend to differ is which numbers to spell out, and which are better left as numerals. )
The one manual that seems to me to be most commonly at odds with CMoS on the 'basic' matters is the AP Stylebook. As far as the present question, that manual says that one should capitalize prepostions that have four letters or more, and otherwise leave them lowercased (unless, again, they are the first of the last word in the title). So it seems that manual would also recommend of Course.
Publication Manual of the American Psychological Association (7th Edition, 2020) agrees with the AP Stylebook.
MLA Handbook (9th Edition, 2021) recommends lowercasing all prepositions when the fall in the middle of a title (see here for the relevant page in the 8th edition (2016)).
New Hart’s Rules: The Oxford Style Guide (2nd ed., 2014) says (the emphasis in boldface is mine)
The initial word of a title is always capitalized. The traditional style is to give maximal capitalization to the titles of works published in English, capitalizing the first letter of the first word and of all other important words (for works in other languages see Chapter 12 and 8.8 below). Nouns, adjectives (other than possessives), and verbs are usually given capitals; pronouns and adverbs may or may not be capitalized; articles, conjunctions, and prepositions are usually left uncapitalized. Exactly which words should be capitalized in a particular title is a matter for individual judgement, which may take account of the sense, emphasis, structure, and length of the title. Thus a short title may look best with capitals on words that might be left lower case in a longer title:
An Actor and his Time
All About Eve
Six Men Out of the Ordinary
Through the Looking-Glass and What Alice Found There
What a Carve Up!
Will you Love me Always?
The predecessor of the above (The Oxford Guide to Style, 2002), says
Capitalize the first word and all nouns, pronouns, adjectives, verbs, and adverbs, but generally not articles, conjunctions, or short prepositions.
For Whom the Bell Tolls Gone with the Wind
A Tale of Two Cities The Way of All Flesh
Can You Forgive Her? Farmer and Stockbreeder
Paradise Lost the Authorized Version
Constable's The Hay Wain
the Book of Common Prayer the Koran
In practice this usually amounts to the first and last words in a title, and any important words in between; very short titles may look best with every word capitalized: All About Eve.
Arguably, all of these manuals recommend of Course, especially since your title isn't short.
Examples from published books
There aren't too many books whose titles include of course, and, among those, even fewer which don't begin with of course. But there are some.
Jennings, of Course! In the front matter of the book (see here), we see a list of titles in small caps, and of is lowercased.
If You Ask Me: (And of Course You Won't) Again, of is lowercased; see here.
Discourse, of Course: An Overview of Research in Discourse Studies This is an academic book, and it also uses a lowercase of. See here.
As promised, there is an exception to this consensus:
Dead Now Of Course (here).
I should also mention that inside Jennings, of Course! we find a place (p. 57) where, unlike in the front matter, the of is capitalized; see here.
While I was able to find at least one published example where the of is capitalized, most other examples have it lowercased. Also, several prominent style manuals, which often give different recommendations, in this case arguably give the same recommendation, which is to lowercase of. Thus, your best bet is to put it as of Course.