The song examples you cite contain walking bass lines from one chord root note to the next.
Chord tones are the notes that make up the construction of a chord. For example, a simple triad is made up of the root, the third, and the fifth notes in the scale.
In a I-IV-V chord progression in C, the chord tones would C, F, and G. When there are chord changes within the song, say, from C to F, there are notes from the scale in between the C and the F (e.g., C-D-E-F). An easy way to transition from playing a C chord to an F would be to “walk” up to it by playing the scalar notes. Of course, it’s also possible to walk down to another chord by reversing this process.
This is a simple example of a piece of a walking bass line. There are many, many more ways to create a walking bass line.
Not really my kind of music, but I think these types of lines and fills are pretty common in country (and, as your examples show, elsewhere as well).
The way I see them (and I might be off) is playing the fifth below in a 1-5-1-5-1-5 pattern and occasionally walk down the scale (major scale) to the new 1, where you play the 1-5 pattern but with the fifth above. Then you walk back up the scale to the 4th (the new 1).
Example: D-A-D-A-D-A-DD-C#-B-A-E-A-E-A-E-AA-B-C#-D and repeat…
Edit: I guess my example is pretty country-specific, while @MikeC 's explanation is more general
It looks like you are talking about chromatic style fills if half step or whole steps notes. It’s quite common and as you stated widely used in all kinds of music. I use that quite often as it’s very user friendly when jamming with new people as it’s letting them know where your chord progressions are heading. It seems to be a go to style of play for people who gigged. Lol.