At STP O2 and O3 have different properties because O3 has different molecular structure (formula) than O2.
O3 is a triatomic molecule, i.e it has three atoms.
O2 is a diatomic molecule, i.e. it has two atoms.
So, they two have different physical and chemical properties.
For example, O2 is odorless while O3 has a strong characteristic odour.
From the chemical point of view, O3 is very unstable and more reactive than O2.