What year was a Winchester Model 12 Serial Y2017145 made and why the Y in the serial Number?

Your model 12 is a "new style" model 12 (designated with Y in the serial number) manufactured between 1972 and 1979. Your particular shotgun was made in 1973 according to the 25th Anniversary Edition Blue Book of Gun Values.