Why is Glass material displayed fine on one object, but material with exactly the same settings shows some kind of nonsense on another? For example, glass of car. The one shown above has transparent glass, while the one below is black & has curved glass reflections. I tried to add Subsurf, tried changing Light path settings, turned off Auto smooth, tried different glass settings, but nothing helped. And this happens often. Please tell me what it depends on & how to fix it?
In provided blend both materials behaves the same for me.
Anyway ... bottom one seems to be correct from material setup perspective. Glass needs a thickness otherwise cycles thinks it is an "endless" glass volume.
Since you add s thickness like Solidify modifier, Cycles know where glass begins and where ends its depth. But as you can see there is some issue with normal orientation.
Go to Data Properties > Geometry Data > Clear Custom Split Normal Data
I guess, this is result you are expecting from glass material.
The simulation of refraction depends on light rays being bent twice. Once on the way into the glass, via a front-facing surface, and once on the way out, through a back-facing surface. Your 'good' glass has thickness, so it works. Your 'bad' glass doesn't.
With a Solidify modifier: (No rim. 'Fill' unchecked, so as not to bother with normals interpolating over the rim walls)
If you want a rim on your glass, you will have to bevel it too, to sharpen the interpolation of normals from rim to surface.