The first flip can obviously return only H or T.
Suppose the coin lands on H. This means that every following string is possible (and thus part of the sample space)

So, there are 16 such strings, because every flip has two possible outcomes.
Suppose now the coin lands on T. Like before, we add to the sample space the following strings:

And thus there are 4 such strings, because we have two choices for each of the two flips.
So, the sample space has 20 outcomes:
H - HHHH
H - HHHT
H - HHTH
H - HHTT
H - HTHH
H - HTHT
H - HTTH
H - HTTT
H - THHH
H - THHT
H - THTH
H - THTT
H - TTHH
H - TTHT
H - TTTH
H - TTTT
T - HH
T - HT
T - TH
T - TT