No, it's for the previous month. If you get a payment in June, it is for May.
for the month ahead
NO. SS is always paid for the previous month. If you die before the end of the month, you have not earned the payment you would receive the following month, and if you do receive it, your estate is responsible for returning the payment.