Modern people interpret that phrase as referring to slaves. The people of that era, did not. Beyond Jefferson and a few others, the vast majority of people read that as applying to themselves. Specifically to white English descended people who were being denied what they thought was fair representation in Parliament.
This idea that "all men are created equal" should apply to slaves was a later invention, but was not at all the intended meaning when the representatives of all the 13 slave states signed it.
The 13 slave states kept slavery. They didn't get rid of it despite "all men are created equal" being put into the Declaration of Independence.
As stated in the Republican party platform of 1860:
2. That the maintenance of the principles promulgated in the Declaration of Independence and embodied in the Federal Constitution, "That all men are created equal; that they are endowed by their Creator with certain inalienable rights; that among these are life, liberty and the pursuit of happiness; that to secure these rights, governments are instituted among men, deriving their just powers from the consent of the governed," is essential to the preservation of our Republican institutions; and that the Federal Constitution, the Rights of the States, and the Union of the States must and shall be preserved.
For slaveholders, once Lincoln was elected, that provision was like a dagger pointed at them and slavery.