Cockatiels can remain fertile most of their life. With hens it is the egg count that goes down, and with males they can be partial infertility in a clutch.
But there are some things that can effect fertility. Regular uses of antibiotics such as preventative treatments can cause short term infertility, and if used extensively permanant damage. Selection of a good fresh quality of seed and veggies helps. If there are any pesticides on the veggies/greens they can contribute to infertility.