Phonology is the study of the organization of sounds in a language. It focuses
on the unconscious knowledge a speaker has of what sounds are
possible in their language (inventory) and how those
sounds can be sequenced (phonotactics).
For example, English has an aspirated bilabial stop [p], but Spanish
does not. On the other hand, Spanish has a voiced bilabial fricative [β],
but English does not.
For example, Words in English can begin with an [s] followed by another
consonant, e.g. [spay] "spy". In Spanish, such words are impossible.
Phonetics
Phonetics is not phonology.