The theme of a literary work is the subject. To obtain it we should ask the question: What is the text about?
In general, to enunciate the theme we use general words, for example, love, death, sadness, betrayal.
Later, on the topic, we can specify the matter.
For example,
The theme of Rome and Juliet is love.
The topic is the love between two members of enmity families.