How does cosmology effect religion?
I think you meant to ask "How does cosmology affect religion?", but I will talk about a few perspectives...
One interesting fact is that to some extent "religion effected cosmology" in that the (Catholic) church has had a particular interest in astronomy and sponsored it to a substantial extent. Read about the Vatican Observatory for example.
In other respects cosmology and religion have been at odds in a number of ways, including difficulties in reconciling "religious" creation accounts with scientific observations and models.
For example, if as a result of their religious beliefs someone believes that the Earth was created 6000 or so years ago, then scientific models that calculate the age of the Earth as roughly 4.6 billion years are often devalued or actively denied.
On the other hand, if someone has been brought up with such beliefs then encounters and accepts the likelihood of these scientific models approximating the truth about the age and size of the universe, etc., then the ways that they understand creation accounts will probably undergo significant re-evaluation.
For example, there are various less literal understandings of the Bible's Genesis creation account that allow for longer time spans. Some "less literal" interpretations might associate Genesis's 'God said: "Let there be light", and there was light' with the Big Bang.
Other approaches attempt to understand the religious texts according to their pre-scientific context, expressing truths through the lens of that context. Should we even try to assess these pre-scientific accounts as cosmology in the modern sense?
One crude and imperfect approach that attempts to reconcile science and religion is to say that science generally handles the "How?" questions and religion addresses the "Why?" questions.