so playing around with SDL I noticed this, what exactly is going on here,I'm surprised I've never come across it before, we are creating an SDL_MessageBoxData named messageboxdata but in a strange way I have never seen before,why do we include everything in {} curly braces?
It is no different than creating a SDL_Rect like SDL_Rect r{0,0,10,10};, perhaps you used a rect and never noticed that you created it like that!
And I can see why it could be convenient to save the settings (parameters) of a popup into a nice block of data so you can reuse it if you want a generic vague "you sure" prompt, and the data itself is quite big when you look at the minimal example on SDL, so perhaps it was the right choice to use a struct.
But other than that it is purely stylistic, from all that you know SDL could've been chose to make the renderer and window have a RendererData and WindowData because someone thought that the constructors (unlike C++, it's just a global function) had too many parameters, and just thrown into a struct.