In Laravel Nova, the afterValidation and afterCreationValidation methods are two different lifecycle methods that are called after the validation rules have been applied to the resource.
The afterValidation method is called after the validation rules have been applied to the resource during an update request, while the afterCreationValidation method is called after the validation rules have been applied to the resource during a create request.
You can define these methods in your Nova resource class to perform additional tasks after the validation has been performed.
As for the updateRules method, it is used to specify the validation rules that should be applied when updating a resource. The resourceId parameter represents the ID of the resource being updated. You can use this parameter to exclude the current resource from the unique validation rule.
For example-
$this->updateRules('unique:users,email,{{resourceId}}')
The updateRules method is defining a unique validation rule for the email field in the users' table, but it is excluding the current resource from the rule by using the resourceId parameter. This means that the validation will only fail if there is another user in the users table with the same email address, but a different ID.