I am personally against letting children take care of pets until they are over the age of 13 and really do a lot of research regarding the pet (though parents should also do that to not let the children "experiment" with the experience), unless said pet is large enough to be the whole family's responsibility like a cat or dog. A lot of pets that are considered "entry level" for kids are actually not all that easy to take care of and require a lot of care to be happy. For example, hamsters actually need quite HUGE cages, a "perfect" cage for a golden hamster (just one! They are solitary animals!) is a whooping 100x100cm. A bare minimum is one that's at least 100cm wide on one side. The hamster wheel needs to be quite large to prevent back injuries, the food has to be good quality (no budget food!), proper diet has to be mantained (mostly grain, fruits and vegetables only as an occassional treat since they're not healthy for hamsters, also since hamsters are omnivores they need some bug protein from time to time). Then there's daily cleaning, understanding that a hamster can bite you, etc. I'm speaking from my own experience as I've had pets since I was a young child and when I realized that a lot of my first pets have been vastly mistreated still eats at me to this day. Goldfish are a whole another story too - aquarium keeping is NOT an easy task!
But at the same time I know that children are not stupid and know a difference between a Tamagotchi and an actual pet, and just because a child can take care of a Tamagotchi doesn't necessarily mean they'd be a good pet caretaker, and even vice versa. But if there's no other way, it's definitely better to offer them a Tamagotchi rather than an actual pet.
Though I personally think that parents should never 100% give children full responsibility of an animal, unless they are sure the child is doing a good job at it, they should be responsible too.