You could use when { changeRequest() } on the stages that you want to execute when the pipeline runs for the merge request, and when { not { changeRequest() } } on the stages that you want to execute when the pipeline runs for a branch after the changes have been merged. Pipeline Syntax
The changeRequest() condition checks the CHANGE_ID environment variable, which is added by BranchNameContributor if a multibranch pipeline is running for a change request. You could also make the steps of the stage check CHANGE_ID, instead of using when, but then Jenkins would not be able to display that the stage was skipped.