Acting inside 2D world

Hi guys
I am very new to editing and I just wendering
how to act inside a 2D cartoon?
My little kids watching kids YouTube videos and I see some very interesting clips
where is the actor play with apple chasing it and eat it bite by bite .. 🙂
or boating in the cartoon of 2D or hiking the mountains or through magic fire things to monsters ..
how to do this ?
I figured out that I need green screen then import the previously made (already made) 2D clip based on the story then the actor act in green screen then the life shots then insert in the cartoon background and so on! Is it correct ?
this is the link of the video that I am looking to learn how to be created !
https://youtu.be/MQpRqrHpwKc
thank you for any inputs guys
