It’s hard for there to be one general answer to this kind of question. Historically most artists work until the end of their lives or until they have achieved the ultimate disability – which is roughly defined as having too much money to need to work.
Of course most art is not like the current state of photography which depends heavily on computer applications and cameras, which are both very complex to operate and master. The key detail in photography (imo) currently is the ability to operate a camera and one or more computer programs. Often the ability to work with computers for some becomes more challenging with age.
I guess the bigger general issue would be if there is a decline in cognitive skills, how that impacts creativity. Again, there is no one answer here however most studies overwhelming reflect that if people exercise their brain regularly, most potential declines in cognitive skills can be largely avoided until or unless other health related issues start to impact cognition. Accordingly, the best defense against a decline in cognition is keeping the brain stimulated. So it may follow that if one continues to attempt creative goals in their art and elsewhere, they will probably not suffer a decline of creativity until other factors get in the way of this process.