Programatically get the webform submission "sid" on submitForm
So it turns out i will have to save the webform before i can get its sid since i am using the public function submitForm which is fire in submitting the webform but before saving it.

Final code will be:

public function submitForm(array &amp;$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) {
// Get an array of the values from the submission.
    $values = $webform_submission-&gt;getData();
    // ...
    $webform_submission-&gt;save();

    // Get the Webform submission "Sid" after saving the webform submission.
    $sid = $webform_submission-&gt;id();

// Show a success message.
    \Drupal::messenger()-&gt;addMessage(t("$sid"));    

}