In this example there are two melodies even indicated on most transcriptions:
What is that called? I’ve heard voicing layers and counterpoint but am not sure if this applies.
The basic technique is called counterpoint. Accompanying a melody with another melody rather than homophony which is accompanying it with block chords.
Some music is clearly one or the other. A Bach fugue is predominantly counterpoint, a folk song with strummed guitar chords is homophony (until the guitarist starts introducing little echoes of the melody, as a good guitarist well might). Much (most?) music has elements of both. This piece certainly does. There's a chordal accompaniment and what we might call a 'countermelody'. That isn't a strict term - a fugue is full of 'countermelodies'. But it's maybe more appropriate where there's ONE main melody, ONE countermelody and a chordal accompaniment. 'Accompanied counterpoint'.