I am not able to write numbers and its corresponding special characters on my Macbook Pro 13-inch, M1, 2020.

Not able to write numbers from the keyboard and its corresponding shift keys. If I constantly hit my numbers on my keyboard very fastly then numbers are getting written but only when I write very very quickly. Still, no special characters are getting written. I checked, and the shift key is working fine because I can write letters in capitals but not shift + numbers. Only keys from 1-0 on my keyboard are troubling me for a few days. Does anyone have any idea about it?