When the Pixel 2 was first introduced there was an uproar about removing the headphone jack. Much of it was centered around a very real dilemma — you can't listen to music through wired headphones and charge your phone at the same time.
Those fears were slightly abated when we saw an adapter from Moshi in the Google Store that had both cords and would let you charge and listen, but it never appeared for sale at Google. It did end up for sale at Amazon or other outlets, and it was (is still) socked with a slew of one-star reviews that say it didn't work. That's because, for almost everyone, it doesn't work and never will.
Unless you have a Moto Z series phone, none of the cheap adapters you see for sale offer a headphone jack and charging port. None of them. They all may not work with every Moto Z model, either. My advice is to just stay away from them.
This is because of parts of the USB-C specification that are optional. Motorola offers these options, but phones like the Pixel 2 and almost all others do not. It may be possible to define some fancy logic that allows this to happen, but you won't get it for $12 on eBay or Amazon.