just over engineer it....don't want a desk that you'll be leaning on for mouse/keyboard etc wobbling about
it needs some kind of design tho...you can't just screw 4 legs to a worktop and expect it to be stable. they'll need some kind of brace like in your pic of the monitor shelf
most of the cheap (or expensive!) flat pack stuff gets it strength from the panels
if you want to build it for the fun or can't find hat you want... fair enough but as I say best off copying a design...or just buying it from somewhere