The fallacy depicted is post hoc, ergo propter hoc, basing causation on chronological order.
Post hoc, ergo propter hoc is the logical fallacy exhibited in this scenario. It is the fallacy of assuming that because one event precedes another, it must have caused the second event. In this case, attributing the power to make the sun rise to the crowing of a rooster is an example of this fallacy.
https://brainly.com/question/29368484