Sounds like you wired the potentiometer incorrectly. If the wiper is connected to 5V or GND, turning the potentiometer to one of the extreme positions will result in a short.
@shamooooot. your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project
See About the Installation & Troubleshooting category.