I wrote an article on the subject: https://michelenasti.com/2019/10/21/how-internet-ads-work.ht... You may find the answer in the last paragraph. Basically, the browser will ask multiple bidders for an ad, and then an auction is performed in the browser. The result of this first auction may be then sent to google to see if there's a better offer from them.
It's called "header bidding" because... in origin.. this stuff was done in the <head> part of the page.