Let me answer just in terms of the units (the other side-questions have been discussed in the comments already):
- Shannons formula is to be interpreted as $W \log_2(1+{\rm SNR})$, where SNR is the signal to noise ratio.
- A signal to noise ratio is a ratio of powers: received signal power divided by total noise power at the receiver.
- Your received signal power is the transmitted signal power $P$ reduced by what you lose on the way ("path loss").
- "Reduced by" means fraction in linear scale (1 Watt transmitted and a path loss of 1000 means you receive 1 Milliwatt).
- We often prefer to use logarithmic scales instead since division becomes subtraction in log scale, which is easier. To do this, we define logarithmic measures of power: The logarithmic equivalent of a power in W is $10 \log_{10} \frac{P}{1W}$ and measured in dBW (dB Watt). It means 1 W is the same as 0 dBW and every doubling adds 3 dBs (2 W = 3 dBW, 4 W = 6 dBW, 8 W = 9 dBW and so on). Alternatively, we can use Milliwatt as a reference and get $10\log_{10} \frac{P}{1{\rm mW}}$ in dBm (dB Milliwatt).
- You are transmitting 23 dBm and losing $128.1+37.6 \log_{10} \frac{d}{1{\rm km}}$ on the way. Hence, as an example, in 100m distance, you have lost 90.5dB. This means your received power is 23 dBm - 90.5 dB = -67.5 dBm. In linear scale this is $10^{-67.5/10} = 0.177 µW$.
- Your thermal noise power density is given as -174 dBm/Hz. This means $10^{-17.4} $W/Hz which at a bandwidth of 10 MHz becomes $10^{-10.4} = 0.04 nW$.
- Hence your SNR is approximately $0.177/0.00004 = 4400$. With perfect link adaptation this would give you $\log_2(1+4400) = 12.1$ bits per channel use (That's a crazy high number! I can tell you that you should not expect more than 2-4 bit per channel use in practice.)
- At a bandwidth of 10 MHz you could use symbol rates up to $10^7$ channel uses per second.
Just to be safe, a few words of warning when converting this to a data rate. This is risky since a lot of things are missing:
- Fading would lead to variations in the SNR which means you'd need to go lower in your modulation order to account for these.
- At 10 MHz you'd encounter frequency-selective fading, which requires suitable mechanisms to combat it, e.g., OFDM or SC-FDM. For OFDM, you then have a frequency-dependent SNR and need to apply bit loading to make proper use of all the subcarriers. IOT devices would do something simpler like SC-FDM but probably not at 10 MHz.
- Reliable communication will require coding, which comes with some overhead.
- You cannot fully use the 10 MHz, due to spectral leakage of whatever pulse shape you are using, you'd need to plan for some guard bands.
- The noise calculation is overly optimistic since no noise figure was included. Typically, you would need to increase your receiver noise power by the noise figure of your LNA. IOT devices may use simple LNAs with higher noise figures.
- In IOT you have multiple access problems to solve, i.e., the devices need to share the spectrum. This comes at some loss, since there will always be times where the spectrum is underutilized and you need to leave room for the initial access of new devices.
And that is still an incomplete list :)