$$N=kTB$$ In this formula for calculating noise power, why do we use the total bandwidth of the system?
I mean our signal is at $f_0$ carrier frequency, why is it effected by a large bandwidth and not just only signal’s frequency bandwidth
$N = kTB$ is the expression for the total thermal noise power within bandwidth $B$. $kT$ (where $k$ is Boltzmann's constant and $T$ is the temperature in Kelvin) is the noise density, meaning power/Hz. It is also a white noise process thus this single constant (assuming a fixed temperature) is the noise density at all frequencies. ($kT$ at room temperature is approximately -174 dBm/Hz, a number worthy of committing to memory).
If you want to compute the total power within a bandwidth $B$, you simply multiply by $B$ to get $kTB$.
The second part of your question is not clear; typically we would compute the noise power within the signal's bandwidth in the process of estimating the signal to noise ratio as the well designed receiver would have filtered out the (amplified) noise power beyond the signal's frequency bandwidth. So $B$ in this case should be the signal's frequency bandwidth and not an arbitrarily "large bandwidth".
The carrier frequency is the frequency shift of the signal to be transmitted over the channel in desirable characteristics. The signal bandwidth is $B$ Hz irrespective of the carrier frequency. In the receiver, first the carrier frequency is removed, and then a base-band filter of bandwidth $B$ Hz is used. That is why the noise power is limited to a bandwidth of $B$ Hz.