Post Hoc Fallacy is a systematic flaw where the assumption is made that if event X followed after event Y it must be caused (or at least related) to the event X.

Post hoc ergo propter hoc (Latin: “after this, therefore because of this”)

Reference:
https://en.wikipedia.org/wiki/Post_hoc_ergo_propter_hoc