I wouldn’t bother trying to filter out master branch for webhook. I would recommend using https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/ and setting up a multibranch pipeline, then restricting it to just master.
Or you could go a normal pipeline, and check the branch name env variable, then throw an error if its the wrong branch.
Generally when asking a question/for help its useful to include
- What did you try
- What did you expect to happen
- What did happen
If you want someone to 100% solve the problem for you, then I recommend hiring a contractor instead of asking for help from the community.