Metal and glass are reusable many, many more times than plastic and are sterilizable with heat. Both metal and glass are recyclable or inert in the environment. If a bottle ends up in the ocean it eventually becomes sand again.
None of the above require oil to be produced.
I'm not saying plastic has no upsides, I'm saying other options exist that specifically address the downsides of plastic. With materials we are always making trade offs.
During communism we used to recycle all food and drink glass containers, but one would only get a few glass shapes and a few jar shapes. They only took back the containers clean and without labels. Most of the work was washing off the paper labels and bone glue. Kids were earning ice cream money doing the cleaning and recycling.