Each LEGO shape is classified as a part. Two seperate pieces with the same shape but different colours are considered the same Part.
If you look really closely the Part number is generally stamped on each LEGO piece somewhere. It’s pretty small, but in good light, it’s usually visible with the naked eye.
When two Parts are the same but different colours, they are each considered a unique Element.