Execute a step only if pull_request is merged

Workflow with following trigger points:

on: 
  push:
  pull_request:
    branches:
      - main
      - release/**

I need to perform some action only when a pull_request is merged.
I am not able to capture pull_request closed event. On merge, there is only a single workflow triggered for push on main branch.

Seems like I am missing some configuration but not sure exactly.

I was able to resolve it by adding ‘closed’ to the types list

on: 
  push:
  pull_request:
    branches:
      - main
      - release/**
    types: [opened, synchronize, reopened, closed]