It's important to understand what "time" is.

To construct a clock, we must have some sort of device which exhibits exact periodicity, and use it as a frame of reference. This is the only way we can measure the passing of "time", via referencing some periodic phase change. Modern atomic clocks observe the oscillation of states in a Cesium atom to define the Second. The quantum nature and energy potentials involved at this atomic scale lead to an exact, measurable periodicity.

Einstein essentially describes a "clock", wherein a particle (or EM wave) periodically travels between two spatially distinct points A and B. First it travels from A -> B, and then back from B -> A, striking a sensor on both sides. That is one pulse. We would then reference all timekeeping via some coefficient of that pulse.

Let's assume this particle is traveling at the constant "speed of light", the highest possible speed for a massless particle that we have observed. In a "stationary" frame of reference, the amount of "time" it takes for the particle to go from A -> B should be the same as B -> A, so we can say 1 pulse is 2AB, twice the distance of A to B. But what happens if A and B are both moving in the direction of A -> B at the same speed? Well, we could imagine that it would take the particle longer to travel from A -> B than before, but quicker to travel from B -> A by the same factor.

Yet, when we conduct such an experiment from the same co-moving reference point (when we move alongside A and B at the same speed), we discover that sensors on both ends confirm that the "time" it takes for the particle to travel from A -> B is still the same exact amount of time that it takes to travel back from B -> A.

What gives? How can this be possible, if the particle is not able to increase its speed while traveling from A -> B, since it already is traveling at the maximum observed speed of light?

Well, when we instead measure the particle's travel from a stationary reference point outside A and B, we do in fact measure the results we expect. It does take longer to travel from A -> B than it does from B -> A. What??? How can we get two different measurements? Isn't there a single, objective reality?

Well, it turns out, if we measure the distance from A to B while in the stationary outside frame, the distance shrinks with proportion to the speed of the moving A & B system. So because the distance shrinks, the "time" it takes to complete a round trip actually shortens. The particle doesn't gain more speed; it just has to travel less.

But when we measure the distance while comoving with A and B, we find it hasn't shrunk. To make things worse, imagine A and B are inside a box. How would they ever know how fast they are really moving? Maybe they seem still, but are they orbiting a star? A galaxy? A cluster?

So we can only discern movement by observing from an outside frame of reference, in the context of two or more distinct frames/objects. We can only measure a relative speed of any given object. From any particular frame, the "speed of light" seems to hold.

That was the mental experiment which led Einstein to uncover the principle of special relativity. And we have since experimentally confirmed both spatial and temporal dilation. Because if space is dilating, our perception of time must be dilating as well, seeing as how the entire measurement of "time" in this scenario is rooted in the spatial distance traveled by the particle.

Does this make sense? This is why we have "spacetime". Time is a direct consequence of measuring the spatial difference between two states of the universe. It's crazy, it's weird, and it asks the question of "what is the speed of light, and why is it relative?", but it's internally consistent and experimentally verified.

To answer your question about timelike loops on a cosmological scale: the energy involved in maintaining the stability of such a system would be astronomically insane. Even the smallest of theoretical wormholes are rifled with issues concerning temporal stability. Under a very particular, theoretical construction of the universe, stable closed timelike curves could be possible, but it's not likely.

Further reading:

On the Electrodynamics
of Moving Bodies https://www.fourmilab.ch/etexts/einstein/specrel/www/

Don't be scared to take a peek at the paper, it involves some light maths, but is largely conceptual and surprisingly digestible.