He is drawing a picture to them. While the Pharisees and the Disciples of John (the Baptist) are following strict fasting rules.
Most other Jews did not.
But to emphasize the issue He is likening His disciples to the “sons of the groom” whom while he (the groom) is still in their midst, they are having a party. The groom is someone who is getting married. Hence a wedding feast. No one fasts at a wedding feast.
Once the groom departs the feast ceases and then the son of the groom will resume fasting. So Jesus disciples once Jesus leaves will start fasting.
Peace!