Headstones Yorkshire personally recommend to not erect a headstone until 3-6months after the burial, as this allows the ground to settle fully, thus avoiding the possibility of the stone leaning.
The 3-6 month rule does not apply to cremation memorials or vases, which can be fixed as soon as the grave is purchased.
Note: Some burial grounds have a concrete plinth placed at the back of the grave to allow for immediate installation, which we can find out if you wish.