Does the third season of Toaru Kagaku no Railgun happens after or before Toaru Kagaku no Accelerator?
The Accelerator anime covers the Necromancer Arc, which (in-universe) starts in early September and ends sometime before September 14.

The Railgun T anime covers the Daihaisei Festival Arc (Railgun version), which (in-universe) starts on September 19 and ends on September 20. It might also cover the Dream Ranker Arc after that, which (in-universe) starts on September 26 and ends sometime in mid-October.

Index, Railgun, and Accelerator pretty much all take place within the same year (not counting flashbacks), but as readers/watchers, we're not sure which year it is (it's never specified directly). See the footnote on the Unified Story Timeline#Trivia page on the Toaru Wikia for more information.