Hello kl004535, I am a student in an American high school. I'm studying to become an American writer.
I believe this is called an adverb clause. An adverb clause would modify a specif word (adverb, adjective, verb). The first example is the sentence that I'm most familiar with in my location.
I hope this helps.
Student or Learner