Think of a theme as Theme: The message. An important fact to remember is identifying the theme in any piece of writing is that the theme isn't going to be directly given, the reader can understand the theme only reading and understanding the work.
The topic is the subject discussed in a piece of writing and it explains what the story is about. Topics are easy to identify as writers generally use a direct approach to define and explain general subject of their works.
So in similar words:
Theme explains why that particular piece of writing was written and topic explains what the writing or text is about.
Hope this helped! <3