The learnopengl example just shows the principle. It loads every glyph into a single texture, which becomes unwieldy if not impossible for use with several fonts or different sizes because you'd end up with several hundred textures. Much better and practicable is the example on the freetype2 site.
I have done a finger exercise on text rendering (plain C and opengl 4.5). It loads glyphs of a given font and size into a single texture atlas and stores the offsets for each glyphs. It has a static buffer for labels and a dynamic one for the display of data that changes every frame. You create a font with size, a "window", add static and dynamic elements to it, and call a draw routine every frame. It is here: https://github.com/BaronVerde/VeryVerySimpleGUI. It is fast and primitive, does not have elements like scroll bars, sliders or text input, yet, and it's plain C. One day i'll heave it to C++ and integrate it in my stuff. Of course, my intention is to hear what you say about it ;-)
A much more sophisticated gui render (besides Dear Imgui), and written in plain C, comes with this engine: https://github.com/mrDIMAS/DmitrysEngine.