Please use code tags when posting code
Even for little scripts it is still a lot more readable that way and it only takes a few seconds.
People may be more willing to help as well in return
https://discussions.unity.com/t/481379
What is the hierarchy setup of your player?
Is the camera attached to your player or is it separate and following the player?
Is your player Sprite (since you’re using 2D colliders) your Player object? or is it a separate child? Or maybe a different Game Object?
Are you sure you’re moving the right Game Object even though it has been tagged as “Player”?
Could you provide more information, others aren’t inside your project and don’t know what it looks like how things are set up. So it is difficult to determine when you’ve only given a small script that sets a position of a GameObject with only the explaination that it doesn’t do what you want it to do. Your environment is important to mention in this case