Oh, God. I thought about this back when I was in high school, as I remember. It was a famous joke. My kids asked the question even earlier. My son was 8 or 9. I suppose that’s not a big deal really, since my true understanding of the issue didn’t come until more recently.
It really doesn’t matter how you conceive of it. Other people might be real, or they might be figments of your imagination, but no matter which you believe, their behavior does not appear to change in any measurable way.
We can say we create the world, and it’s no different from saying the world creates us, functionally speaking. Although, it makes sense to say that we create the world through our perceptions. We have no idea what the “real” world is like, since we can only perceive it through our perceptions, and our perceptions are demonstrably imprecise, and often just plain wrong. No matter. We create the ideas of precise and right and wrong. They didn’t exist before humans showed up.
We created time. We created other measurement systems. None existed before we came along, and because you couldn’t measure anything, you couldn’t prove it existed.
But none of it matters. Our behavior is pretty much the same no matter how we look at it.