Check multiple lines for match [string]

Hello guys, tell me how can I check the correspondence of variables in the process, for example, I have two lines string_1 = AAA and string_2 = BBB that were filled earlier, then the following sequence is executed in which there are also variables with the same data (string_3 = AAAA and string_4 = BBB), I need to check that string_1 = string_3 and so on, as the check ends and the data matches, the process continues; if not, it ends.
Tell me the best solution without creating a hierarchy of verification conditions

Hi
If we want to check whether they are equal use condition like
String3.ToString.Equals(string1)

Or to check whether string3 has the part of value of stting1 then use the condition like this
String3.ToString.Contains(string1)

Cheers @bas.developer

Immediately at the same time I can’t check all four variables or only by one?