Religion is a set of ideas, conditioned by belief in the supernatural, which includes rituals, various cult actions. Doctrine - a set of theoretical provisions about any area of the phenomena of reality.
Religion infuses all sorts of chimeras into the human brain, while teaching makes it possible to obtain knowledge in a humane way. At the same time, it does not clog or zombify the brain.
Religion talks about the root cause of everything (God / gods) and teaches the rules of the universe + worship of God / gods (or, in the case of Shinto, ancestors).
The teaching may not be religious and give explanations / advice on social, economic, political issues, ethical or philosophical categories and other ideas. Religious teachings are also usually based on specific ideas, leaving other elements of religion in the shadows or even outside.