I think Nolan wrote the main character with Denzel in mind
he probably wrote Tenet about 20 years ago (or at least the rough treatment) but when it came time to making it Denzel was at least 10years too old to be believable as a secret agent (although I guess he could've rewritten it so its an older near retirement agent instead of one starting out).. so went with his boy who sounds the same and told him to act like his dad in Deja Vu
I'd imagine originally he had some other actor in mind for Neil too.. probably someone Bondlike like Brosnan or even Bale. but again too old/familiar now (got to freshen your casts up keep up with trends/whose of the moment/who might help the movie etc..and RPatz is kind of a respected actor now anyway whose worked with Cronenberg etc )