Extensions are redistributable software packages specifically designed to be used in Yii applications and provide ready-to-use features.
For example, the yiisoft/yii2-debug extension adds a handy debug toolbar at the bottom of every page in your application to help you more easily grasp how the pages are generated.
Modules are self-contained group that consist of models, views, controllers, and other supporting components. End users can access the controllers of a module when it is installed in application.
For example, i have requirement to develop diff module for buyer, seller, admin then what i do i generate module for 3 having differnt mvc.