Shoot projectile at touch input location

Hello, I am trying to make a 3D side scroller. I was trying to make a better shooting functionality because now the player can only shoot straight. I have tried a lot but I can’t figure out how to make the barrel rotate towards the place I have touched the screen and also shoot the bullet towards that rotation. So pretty much shoot the bullet towards the location I touched the screen.
Can anyone give me any advice?
PS: I already checked the other posted question about this but none of the answers work.