Is the sentence

While some people love cats, others prefer dogs.
punctuated correctly?
I put comma between two parts

Yes, you punctuated it correctly.

Yes, you punctuated the sentence correctly. A comma must be used to separate two classes that are not related. A semi colon is not necessary, because a semi colon must be used as a conjunction in a sentence.

Yes, the sentence "While some people love cats, others prefer dogs" is punctuated correctly with a comma between the two parts. The comma is used to separate the dependent clause "While some people love cats" from the independent clause "others prefer dogs."

Yes, the sentence "While some people love cats, others prefer dogs." is punctuated correctly. The comma is placed correctly between the two parts of the sentence, separating the clause "While some people love cats" from the clause "others prefer dogs." This comma helps to indicate a pause and clarify the relationship between the two ideas expressed in the sentence.