Ok, got a better understanding of where you are now.
it’s probably a matter of working through the standard setup now really. Yes, check chain length, that’s one tick box
https://www.parktool.com/en-int/blog/repair-help/chain-length-sizing
in this case though with a 1×8 setup (kids bike setup can fall out of most internet guides) I’d be looking to get the chain as short as possible whilst still fitting in the biggest cogs front and back through the derailleur.
however, slipping on cogs isn’t usually a chain length issue. Check b-tension would be next on my thoughts, especially as you’ve replaced the mech.