This depends on many factors. In general, an MS degree deepens one’s knowledge, allows one to become an expert in a new field, and has the potential to increase one’s career options. If one’s goal is to have a higher paying job, the answer is not so clear. Many useful views, pro and con, are available online. In particular, the Quora question “What makes a Master’s in Computer Science (MS CS) degree worth it and why?” gives a range of answers.