How to keep a github PR's code separate from other branch's PR code?

I am looking for git and GitHub related help.

I am working on a project and resolving issues, I am creating a different branch for every single pull request (PR).

Last time I created two different branches with their Pull requests and resolved both of the issues. now the problem is that both of my pull requests got messed up with the codes that I pushed on different branches. BTW I created a branch on git bash with the help of the following command: git branch branch_name. and then: git checkout branch_name.

can anyone guide me on how can I keep each pull request’s code separate from each other? thanks in advance

What exactly do you mean by “messed up”? In general the branches will be separate until they get merged.