There is no definitive answer to this, but I would recommend being at least six. Even then, it can be a hard going initially. But sometimes I’ve had five years olds get on surprisingly well.
I have sometimes started younger pupils on ukulele and then graduated to guitar. A lot of chord shapes are the same on a ukulele and there is a good crossover, much in the same way recorders lead well to the flute (although ukulele sound infinitely better than recorders in my opinion!)
We could also start by not playing the guitar/ukulele for the whole lesson. There are various games we can play with rhythm and clapping, and we can try singing songs also.
I am recently DBS checked – please ask to see this if required.