I've had all sorts of rodents and reptiles and in my experience guinea pigs are the easiest of the bunch for kids.
They have a great balance of cuddliness and independence. Rats are amazing and my favourite but in comparison to pigs they are smarter and require more stimulation/active bonding time.
Gerbils (which I have at the moment) are fast, tiny, escape easily and are more fragile and they chew absolutely everything. Guinea pigs are sturdier and will be easier to take care of if they get sick, easier for a child to hold and tend to (including cutting it's nails etc), they can hardly jump and although they can be fast, they're big and easy to catch.
Hamsters are adorable but most of them like to be left alone and are not necessarily very fun for a child to interact with. Degus and chinchillas require a decent knowledge/experience and space. Rabbits are a horrible choice for most young kids for many reasons I won't get into now.
With most small rodents the males are cuddlier, calmer and less territorial in my experience.
I really love bearded dragons and all the ones I've had or taken care of have been very sweet and attached to humans but in the end, of course a reptile doesn't provide the same "warm and fuzzy" experience some kids might crave. If you think your kid would enjoy it regardless, they are a great option. Reptiles do require a lot of research and sometimes an expensive setup because their habitat pretty much determines their entire well-being and has to be perfect. For example for most rodents you can make do with things you have at home like cardboard boxes, toilet paper rolls, old pots etc. With reptiles you really have to plan their habitat very carefully. You also have to be not squeamish with live bugs and worms etc.
I'd like to also like to mention turtles and tortoises. Water turtles especially can require a huge tank (based on species) but they are really fun and can really bond with humans and a be an absolute joy to watch.
So it all depends on your budget, experience, willingness to research and of course your child. Something else to bear in mind is life span, do you want to make a commitment for 15 years? On the other hand, will your child be able to cope with losing a gerbil or a hamster every 2-3 years? Do you have any vets around you who specialize in small animals or reptiles? Alot of vets dont know heads from tails with some animals sadly.
Of course this is all sweeping generalisations and you might get a rat that sleeps all day or a guinea big who hates being touched! You never know with animals really. And just because an animal might be easiest doesn't mean it's the best choice for everyone either, I fell in love with the little sticking out ears of my first ratties the moment I saw them and not even the whole world could have convinced me to get other pets.