Meaning of “of course” - Learner’s Dictionary

of course

adverb uk us /əvˈkɔːs/
YES

A1 used to say 'yes' and emphasize your answer:

'Can you help me?' 'Of course!'
OBVIOUS

B1 used to show that what you are saying is obvious or already known:

The rain meant, of course, that the match was cancelled.
Of course, the Olympics are not just about money.
of course not

A2 used to say 'no' and emphasize your answer:

'Do you mind if I borrow your pen?' 'Of course not.'

(Definition of “of course” from the Cambridge Learner’s Dictionary © Cambridge University Press)