You should take a look at the SIR model:
https://en.wikipedia.org/wiki/Compartmental_models_in_epidem...It's a simplified model for an epidemic, where you have a wave and after some time everyone is dead or recovered, and the virus can't infect more people and disappear.
There are two important graphics. They are together in https://en.wikipedia.org/wiki/Compartmental_models_in_epidem... One if the daily cases (maroon) that looks like a wave, and the other is the cumulative cases (teal) that looks like a step.
Real life is more complicated. If you look at the second graph of South Sudan, they had two waves, one in May-June 2020 and the second one in February-March 2021. Compare this with the daily cases (maroon) of the simplified model.
Now take a look at the first graph of South Sudan that you linked that is the number of cumulative cases. It has two steps. Each step is one of the waves. Compare it with the recovered (teal) cases in the simplified model. The graph in the simplified model is too small. You must imagine that it's extends to the left and right as horizontal lines.
Also, real life is more complicated, because some people has natural immunity or immunity from a previous similar illness, vaccines, lives completely isolated in a forest, a lot of luck, ... and many more reason to skip the epidemic.
The important part, is that after some time the virus can not propagate and die. So the graph of cumulative cases is a horizontal line, then one/two/three/... steps and then an horizontal line. That's why the cumulative graph are very similar.
Also, real life is more complicated, and newborn have no immunity, and vaccines are not 100% effective, So if you look at this graph of the annual cases of measles https://en.wikipedia.org/wiki/MMR_vaccine#/media/File:Measle... you can see that there are big waves, and after the first vaccine was introduces, the number of cases decrease a lot. But there are still smaller waver more separated when there are enough newborns with not enough immunity from the vaccine. And after they added a second dose, the waves disappear!
Back to the graphs you linked. In the second graph of Gibraltar, it looks like they had a small wave in April 2020, then two middle waves in October and November 2020 that are very close in time, and then a huge wave in December 2020-January 2021. So in the first graph you can see one small step, then a medium step that is not so sharp, and then a big step.
Oversimplifying, after some time the virus can't spread because there is no enough new people to infect. The people is in the slots: dead, recovered, vaccinated, lucky. You only try to choose how many people get in each slot.