It depends upon the type of graph that you are talking about,
If the graph is Velocity - Time graph, then time lies on the X axis and speed on the Y axis.
If it is Distance - Time graph, the time lies on the X axis and distance on the Y axis.
But generally, it is ALWAYS TIME IN THE ‘X’ AXIS AND DISTANCE ON THE ‘Y’ AXIS.
Let me know if you have any doubts by either commenting or messaging me