Article: Brahmi evolved into a multiplicity of Brahmic scripts, many of which were used to write Sanskrit. Roughly contemporary with the Brahmi, Kharosthi was used in the northwest of the subcontinent. Sometime between the fourth and eighth centuries, the Gupta script, derived from Brahmi, became prevalent. Around the eighth century, the Śāradā script evolved out of the Gupta script. The latter was displaced in its turn by Devanagari in the 11th or 12th century, with intermediary stages such as the Siddhaṃ script. In East India, the Bengali alphabet, and, later, the Odia alphabet, were used.

Now answer this question: Around what time did the Gupta script become prevalent for writing Sanskrit?
between the fourth and eighth centuries