Welcome to the site !!
Did you happen to fall or lay over the bike on the shifter side ??? , or even stomping or forcing the shifter down hard with your foot , sometimes when that happens it jams the shifter up and bends the shift fork in the transmission , or causes issues with the shift drum... and that will cause it to be hard to shift ... usually this is the issue with hard or missing a shift constantly ... , so yes , if it is this , it is within the transmission , and would need to be torn apart to fix , it could be something else , but most likely , something got jammed or bent to cause this issue