Arduino nano suddenly not working

After I soldered my arduino nano I tested it using the blink program found in the examples it worked so I tried to upload my code which involves ultrasonic sensors, lcd, temp sensor, and vibration motor. I first tried to wire up my ultrasonic sensor with my arduino nano in the breadboard, it didn’t work so I tried connecting it directly to the arduino nano pins using the male female jumper wires when I plugged the usb cable it started to smoke so I disconnected it right away and then I tried plugging it in again but the led doesn’t light up. However when I used the 9v battery as power source it is still working. How come? Hope you will help me, I’m just a beginner in these things.

Drop food on the floor < 5 seconds, you can still eat it ?

Too late.

Show us a good schematic of your circuit.

Show us a good image of your ‘actual’ wiring.
Give links to components.

This is just the wirings that I did when I plugged in the usb cable of the nano and then after a few seconds while I was opening my software it started to smoke.

Why is a part of my nano damaged? Because I am still comparing to my other nano and there is no difference or signs that it is damaged?

If you let smoke out of your PCB, some electronic device has been damaged.

If the board is still working this may come back and bite you later.

It’s up to you whether you want to chance future problems such as more smoke and/or damaging the laptop or PC you connect to it.

Where exactly did the smoke come from ?

I have a place called file 13. When something smokes it is placed in that bin which is then faithfully dumped into the trash bin every few weeks. It may be possible to repair it but I cannot advice that as I do not know your skill set and tools available. You may try to repair it and if you get it working great, if not there is still file 13. My SWAG is it is the regulator.