Buddhism began to spread throughout Japan during the Heian period, primarily through two major esoteric sects, Tendai and Shingon