why ionic compound do not consist of molecule
Molecular compounds consist of neutral entities, called molecules. These molecules can be together in a crystal lattice, or as liquid or gas.
Ionic compounds consist of independent charged entities, called ions. Ions also can be together in a crystal lattice, or in liquids. So, an ionic compound actually has two (or even more) different species in a single crystal or solution, which exist independently. The only reason why they are together is because of the total net charge, which must be zero.
An example is NaCl. This is not a molecule, but consists of independent entities Na(+) and Cl(-). A crystal of table salt hence consists of Na(+) ions and Cl(-) ions in a 1 : 1 ratio, making the thing electrically neutral on a macroscopic level. Solutions of NaCl do not contains NaCl-molecules, but separate Na(+) ions and Cl(-) ions, which can move through the solution, independent from each other. So, you really have 2 different species in the crystal. The Na(+) ions and Cl(-) ions only are bound to each other because of their charges, there is no true chemical bond between these entities.
If you compare this to sugar, which has formula C12H22O11, then you immediately see the difference. Each molecule C12H22O11 is one entitiy. Take off a single atom, and you don’t have sugar anymore. Solutions of sugar consist of molecules C12H22O11 which move through the water as whole. They do not break apart in smaller units. If they did then the solution would not be a sugar solution anymore. In the sugar molecules, all atoms are tightly attached to each other through chemical bonds.
There are also many compounds, which combine both the molecular bond and ionic properties. An example is potassium nitrate, KNO3. This consists of two separate entities K(+) and NO3(-). But inside the NO3(-) entity, you have true chemical bonds, so NO3(-) can be considered a molecule with a net charge -1. When such a compound is dissolved in water, then the ions K(+) and NO3(-) can move independent of each other, but the ion NO3(-) is a single entity. If one would split off an oxygen or a nitrogen, then it is not nitrate ion anymore.
One can even have compounds in which both the positive and negative ion consists of charged ‘molecules’. E.g. NH4NO3 consists of NH4(+) ions and NO3(-) ions, where the NH4(+) entitity and the NO3(-) entity is a ‘molecule’ with charge and the compound as a whole consists of two different species, being NH4(+) and NO3(-).