Those are not the same things... Glass is better for the environment, for one it doesn't break down into microplastics which get everywhere.
And glass can be recycled indefinitely (minus some loss due to impurities) whereas plastic can be recycled up 0-1 times usually.
Plus the whole "it's up to consumers to solve this" is just corporate propaganda to absolve themselves of any responsibility, all the while not offering any alternatives that a consumer could pick from. Like literally, they paid for marketing campaigns to convince the public that it was our fault.
But the problem is that these plastics even if disposed of properly by the consumer are still waste.
In the EU most of the bottles for soda have a deposit-scheme attached so they are returned in high percentages.
The issue is everything comes in plastic nowadays.. even cucumbers are wrapped.
The manufacturers are the ones that select the packaging. They should be made responsible for the recycling. That will immediately make them switch to packaging that can be recycled. Glass, paper, cardboard.. whatever. But plastics are bullshit for many applications.. especially for those vanity packaging's that make the product look larger by being in massive trays of plastics.