If the Enter key is not working, there is a high chance the Enter key is fine, but some other key is stuck, most likely ALT, CTRL, SHIFT, DEL, any key that would not show up doing something immediately. Try to tap those keys a couple of times to get them unstuck. If that doesn’t work, clean the entire keyboard. But just know that it most likely isn’t the Enter key itself. Another thing you can do is check if the same happens to the enter key on your numeric keypad, if you have one. If BOTH of them don’t work, you can be positive it’s another key keeping it from working.