Creating and saving a GlobalSet element type in Craft 3
Answer: 

So I looked in the craft core to see how the CP does it. Turns out we have to use this 

$gs = new \craft\elements\GlobalSet();
$gs-&gt;name = "Meta";
$gs-&gt;handle = "meta";

Craft::$app-&gt;getGlobals()-&gt;saveSet($gs);


Hope this helps someone. 

Craft core reference

https://github.com/craftcms/cms/blob/develop/src/controllers/GlobalsController.php#L55-L96