
How do you make project manager understand that sometimes you can’t give correct estimates for some tasks or bugs?

Don't convince him , confuse him
Just say it that it can be done in two parts as it takes a large time , as always two parts cant be done in one sprint so you will have time to finish

The thing is I’m mostly given tasks that require lot of debugging, sometimes I get stuck. End of the sprint it looks bad on me as I have tickets remaining on my sprint goal. Project manager doesn’t understand complexity. I don’t know how should I navigate this situation

First check all the tickets which one is done easily do that stories/tickets and heavy stories only take if it has much priority
Don't take too much time and say the things at the last day of sprint, he will get mad . Just whenever you start and understand the complexity say that on standup and ask to increase points or make it two points because rollover will make negative impact