As per the FAQs in the Google Maps API documentation, since the map you provided appears to be in India and you are attempting to display railway tracks or directions, I believe the issue you are encountering is due to the Indian Railway Catering and Tourism Corporation not being supported for transit directions.
There is a specific question in the documentation that asks: “In which countries are transit directions available?” The answer is:
"The Routes API supports all Google Transit partners, except the Indian Railway Catering and Tourism Corporation and those in Japan."