PWM block was released in version R2020b: https://mathworks.com/help/simulink/slref/pwm.html
There are other blocks that can be used as well in Simscape Electrical: https://mathworks.com/help/sps/pulse-width-modulation.html
It is also possible to implement a simple one by comparing the modulation waveform (sinusoid) with a triangular carier (using a Repeating Sequence for instance https://mathworks.com/help/simulink/slref/repeatingsequence.html).

