In the lifetime of a bicycle is it a net contributor to pollution? Yes. Is it better than literally every alternative transport option? Unless you're walking barefoot, also yes (and even then, you consume much more energy walking 20 miles than cycling 20 miles, requiring more food per mile)
The environmental cost of mining and refining the raw materials that go into the manufacture of bikes, components, apparel and consumables is not insignificant, and neither are the costs of shipping them across the world.
Some of the chemicals used in the maintenance and operation of bikes are probably not great either, whether locally or at the site of production.
In the grand scheme of things, cycling's environmental impact is probably not even a dot when compared to the lifetime environmental cost of every other transportation mode - cars don't magically appear either. They too have to have their resources mined, shipped, processed, shipped, assembled, shipped, maintained and then, at the end of their life, scrapped.
On top of that they literally burn a finite resource, the production of which is staggeringly polluting, and in the process exhaust harmful waste byproducts for their entire useful lifetime.
EVs are only better in this latter regard, and are potentially much worse up front with the lithium and cobalt mining, the former extremely water-intensive - another finite resource, and one which is a basic requirement for life - and the latter is terribly polluting.
I don't have hard and fast figures but it doesn't take many journeys by bike that would otherwise have been done by car to break even when all externalities are factored in.