How to disable creation of spaces on macbook? How to disable creation of desktop workspaces on macbook? 

Somehow they get created when I don't need them. [OS: Mojave]
If there’s no window on a space, do the three finger swipe up gesture or F3 and you can hover on the top left corner of the thumbnail and a cross appears. Just delete the space. 

If there is some window on some space, you can drag it and bring to the other space to make the previous one empty. In the same mission control state, hold the window in one space and drag it to destination thumbnail. 

If it is made by a full screen app, as Tetsujin says, it cannot be deleted and when app returns to its original space, the other one is automatically deleted.