burning a bootloader

I have a question about this subject.
I am working on a project using ARDUINO UNO with sensor LM35 to measure a temperature and gives some output to the pins as the code
my question is that if I have a microcontroller and then tried to do burning the bootloader.
Does that means the code only is in microcontroller chip and I should connect the sensor and the rest of the circuit with it or I got it wrongly?

I'm confused about what you ask.
Look, the bootloader is a program which allows to upload program (an application) via serial line. It is mandatory for serial uploading. In principle, it has nothing with other HW in the circuit and also it does nothing during normal program run.

Burning bootloader requires connecting an ISP programmer to the target Arduino, and is typically done to prepare a new chip for serial uploading, or if you're changing the clock source. It is not something that you do during normal operation, and doing it without an ISP programmer connected will just fail.

It seems that you have some misunderstandings about how this works, or are not explaining what you are doing / want to do very well.