this example doesn’t use
Yes, because it’s using OpenGL directly.
If you use the 2D render API, and force it to use the software renderer, this will also tell it not to use OpenGL behind the scenes (just to get the image to the screen, but not for any actual rendering work, because even for software rendering, this tends to be the fastest way to get a block of pixels to the screen on many platforms, plus it lets things like the Steam Overlay work with the game).
While you can use SDL_UpdateWindowSurface if you definitely just want to manually manage every pixel in software, you almost certainly shouldn’t. Even for entirely software-rendered things, it’s best to use SDL’s render API to get them to the screen for a variety of reasons.