Hi Sneha,
I think this depends a bit on how your date picker is required to look like in the screen. If you don't have a design requirement that forces you to use the default date picker, I would indeed go with 2 dropdowns (one for month and one for year selection).
Since no day-picking is involved, the logic to select the month and then the year should be straight-forward (i.e. you don't have to validate dates like 30.02.2022).
You can also make use of this or a similar Forge component, if you don't want to build from scratch.