We don’t know.

How can space not go on forever?

Either question is pretty much the same. All we really know is it seems to be pretty big, and it takes a long time for light to reach us from far away. The farthest we’re able to see is just under 14 billion light years, so we don’t know if there’s anything beyond that or not, but it is a quandary how come there’s nothing older out there.

It suggests there was a big bang, a creation moment, somewhere back then.