While it’s true that all cells have the same DNA, not all of it is actively read by the cell.
Some cells use some parts of the DNA while others use other parts. This is what gives rise to all the different cell types.
In other words, all cells contain the same genes, but express them in different patterns.
For more info look up “epigenetics”.