Previous replies should answer a lot of your questions.
The first three notes in your YouTube example are B, D and F. Those are the third, fifth, and seventh notes (chords) of the key of G. He is playing some kind of a G Major scale.
It sounds like he plays G Major 7, D7 the V7 and the vii, F minor 7 flat V. It could be played as all 7th chords or other chord substitutes. I’m guessing he’s playing the traditional I Major7, V7 and the vii chord, F minor 7 flat 5. Using chord substitutes is improvisation. If it sounds good, it probably is, but when studying a new song learn as written before using substitute chords.
First, find those notes B, D, F on your instrument. With the notes you can determine the scale in which it is played. Use thirds, 1,3,5,7, or, G B D F. Chords in any major key are usually 1 Major, ii minor, iii minor, IV Major, V7 a seventh chord, vi minor and the vii, minor 7 flat5.
Find the notes, stack them in thirds. Stacking notes in thirds is a good start and how it is done. Take the other examples on your YouTube site and see what you can figure out from the notes and chords.
Study music theory as your questions are addressed in a good music theory book.
One example of a good theory book, a text in some colleges and for reference is “The Jazz Theory Book” by Mark Levine.