Yokubi — The Common Grammar Guide (https://yoku.bi)
Explanation
後 is a noun that means "after". X後で is a conjunction saying that something happens after X, although not necessarily immediately.
前 is the opposite of 後 and means "before". 前 can both mean before in the spatial sense (i.e. in front of you) and in the time sense (i.e. the past). This is unintuitive because of the notion of "putting the past behind you", but if you think about a line of people waiting, the ones *in front* of you will take their turn *before* you. So when it is your turn, theirs will have been *in the past*.
The conjunction X前に means something happens before X does, not necessarily immediately. If X is a verb, it **cannot** be in past form.
前 and 先 are almost synonyms.
先 is a noun meaning "before", "ahead", or "front part/end". Generally, when 先 is spatial, it means the front ("tip") of something, or the direction it's headed, not the location immediately in front of it.
Just like 前, it can mean "before" in time too.
さっき is a casual version of 先 that is exclusively used to mean a "moment ago".
時 is a noun that means "time", but if you give it a relative clause, it can act like a conjunction ("when" or "at the time of").
Verb + 時 behaves differently depending on the tense of the verbs that come in the statement before and after it. There are various rules but in general if the verb before 時 is in past tense, it means that the action after 時 happens as the action before it has already been completed. Don't try to memorize these rules though, just learn to recognize them as you go.
In context 2 examples
目線の先には、少女がいた。
A girl was before my eyes. (lit. "ahead of my line of sight")
それは先に言った。
I said that before.