Question: This is my first time DMing, and I already have the Player's Handbook. I'm wondering which core book I should get next: the Dungeon Master's Guide or the Monster Manual? I am creating a campaign for four players, and I already have some of it done, but I would like to have better sources for the rest of the campaign. Which one is more useful?

Answer: 
The DMG is much more important.
-------------------------------

First, it's worth noting that it's pretty important to have all three books.

That being said, the DMG contains lots of useful information for a new DM. While more experienced DMs might scoff at the advice inside, there are still a lot of useful tables, maps, and suggestions in the DMG that are good for getting off the ground. 

Additionally, the DMG contains the list of magic items, as well as guidelines for creating your own monsters and magic items. With the sample monsters in the PHB and the creation guidelines, you could create your own monsters fairly easily. 

A lot of Monster Manual is (legally) available online.
------------------------------------------------------

The Open Gaming License legally makes a large list of monsters available for free. You can access this list at various places on the internet ([here](https://www.5thsrd.org/gamemaster_rules/monster_indexes/monsters_by_cr/), for example). The list is missing some classic monsters, like the beholder, but for practical purposes it doesn't really matter.

On the other hand, a lot of the DMG advice and creation guidelines are not legally available on the internet (though many magic items are). Thus, buying the DMG gets you a lot more stuff you couldn't get otherwise.
As a general rule I typically go PHB > GM Guide > Other stuff in that order. Mostly because the PHB and GM guides tend to compliment one another (your mileage may vary). Which is to say that the GM guide may refer to specific examples from the players guide or add additional clarifications to rules. On the other hand, books such as the Monsters Manual are more reference material for things that you can throw into your game.  

Additionally, I would also do a couple of web searches for GM tips (aka free advice). For the most part game mastering *can* be genericized to a point. Which is to say there are problems, and solutions, that all game masters have. Going into more specific problems can be asked with further questions here.