How you know multiple characters are one concept
Modern Chinese prefer words rather than characters. The former way you translate a Chinese sentence is probably more suitable for ancient Chinese (known as 文言文).

It is not a big problem for a native Chinese speaker to naturally divide those characters into words, however for beginners, it can be hard. But guess what, dividing Chinese characters into chunks is a well-known research direction remaining unsolved in natural language processing and machine translation.

So the answer to your question is: The more combinations you know, the more accurately you can divide. You can hover your cursor on the words in Google Translate, and Google will tell you its (guessed) division scheme.