if you use your computer for longer than casual use, you need to have it placed at a proper ergonomic height.
The computer should be placed at a height so that when typing, your WRISTS are in a "neutral" position, neither bent backward nor forward.
Resting your wrist on the leading edge of the computer suggests that the height you are using is much too high. Professional typists traditionally used a typewriter surface lower than standard desk height. As others have already suggested, an external keyboard (and possibly trackpad/mouse as well) might help get that typing/mousing position to where it needs to be.
NB>> If you fail to take action to get your wrists to a neutral position, the discomfort you are experiencing now will seem trivial compared to what follows. You are risking one or several long term repetitive strain injuries, including carpal tunnel syndrome. Once these set in, they are extremely difficult to overcome, and much more painful.
Whenever issues like this arise, Apple Support urges you to contact Apple Support by telephone for more complete guidance.
If you are in the US, that is 1-800 APL-CARE
1-800-275-2273
otherwise, use this link to get the number for your region:
Contact Apple Support - Apple Support