safest bet is to get a medic ASAP. But HYPOTHETICALLY if for whatever reason that’s not in the cards- If you have a glass cutter- yay. If not a drill bit that will work on glass and nerves of steel, and aren’t hung like John Henry- drill a hole near the end of the bottle furthest from you, going VERTICAL NOT HORIZONTAL.
You can also- again- depending on how much of that bottle is you and how daring you are- try and chill the bottle such as using cold water. Dip a string in acetone (or nail polish remover with acetone if you don’t have pure acetone) and wrap it around the bottle in a ring as far from your junk as possible. Light it on fire. Repeat until the bottle splits. Once you’ve broken the vacuum seal on the bottle, getting yourself out should be relatively easy, and if you can’t figure that out and aren’t willing to see a doctor- AND got stuck this way in the first place... having a penis might not be for you, and you are on your own.
Be advised that any drilling or cutting has risks- asides hurting yourself if done carelessly- the glass can crack or shatter even when using the right tools. So you could end up in dire straights. Using fire has similar risks as well as the risk of burns etc. this isn’t medical advice. Call a professional if this happens. This is just a hypothetical way that a person trapped alone and without hope of medical help might try to save their member.
You can also- again- depending on how much of that bottle is you and how daring you are- try and chill the bottle such as using cold water. Dip a string in acetone (or nail polish remover with acetone if you don’t have pure acetone) and wrap it around the bottle in a ring as far from your junk as possible. Light it on fire. Repeat until the bottle splits. Once you’ve broken the vacuum seal on the bottle, getting yourself out should be relatively easy, and if you can’t figure that out and aren’t willing to see a doctor- AND got stuck this way in the first place... having a penis might not be for you, and you are on your own.