This will automatically trigger job execution for every branch, you have for your project repository. This solves the problem of creating new build for every new branch we create on the fly.
Multibranch Pipeline is a plugin in Jenkins. In this article we will see how to create multibranch pipeline. Ensure that Pipeline: Multibranch plugin is installed in Your Jenkins instance.
Once the plugin is available in Jenkins, We are going to create a multibranch pipeline job in Jenkins.
As you see my project at GitHub is having two branches: https://github.com/sonucogni/Jenkins_Pipeline_Demo/
Also, ensure that you have created Jenkinsfile as this is a pipeline job. You can read about Jenkinsfile creation here: https://dev.to/raghwendrasonu/create-jenkins-pipeline-with-an-example-3p7j
I hope this was helpful.