This is an animated film! Probably around 90s-2000s
I'm not too sure how the movie goes, but I remember the ending pretty well.
Apparently the boy and girl near the end of the movie reach this machine, that tells them that this world is going to die.
And they reprogram it, so to create a "new world"!
Sorry for being so vague, but the ending is stuck in my mind!
Hopefully you guys can remember this movie :)