i am trying creating extension but not getting extension option only getting webpart
2 Answers
As kumar said, you need to choose 2019 Onward
BUT also notice that they dropped support for these options since 1.13.x https://docs.microsoft.com/en-us/sharepoint/dev/spfx/yeoman-generator-for-spfx-intro#retired-generator-prompts
on the other hand, PnP/generator can help you with that also https://pnp.github.io/generator-spfx/#command-line-options including for on-prems
In order to create a SharePoint Extension choose any one of the below options for the question, Which baseline packages do you want to target for your component(s)?:
SharePoint Online only (latest) SharePoint 2019 onwards, including SharePoint Online