When you say:
rs=string(sym, 4);
What you are doing is saying, "build me a std::string object, and I (the programmer) will help you (the program) do that by giving you this character array and a number." The code behind std::string class knows that in that instance, where it is given a character array and an integer, that it should take the number of characters indicated from the character array and construct a std::string using that content.
When you say:
string rs2=string(rs, 4);
What you are now doing is saying, "build me a std::string object, and I will help you do that by giving you this already existing std::string object and a number." The std::string class does something completely different in this case. When it receives those two arguments, it instead uses the number as place to start reading from the provided std::string.
These two different cases are two different constructors for the std::string class--they provide two different ways to build a std:string object based on the information you have available. You can easily make the second example work like the first by changing it to this form:
string rs2=string(rs, 0, 4);
Now you are telling it "initialize this new std::string (called rs2) by taking characters from the other std::string rs. I want you to start at the character at index 0 (so, the first) and take 4 characters after that--if they exist."
It is important to know, before you construct an object of a class, how the constructors behave. You can find documentation on all of the std::string constructors in many places online with some searches.
Author's note: It is noted that many other things are happening in this example (for example, the assignment operator) and many issues are glossed over, but given the self-stated beginner nature of this question, I felt it best to keep it high level.
stringat en.cppreference.com/w/cpp/string/basic_string/basic_string