Let’s take a CD audio audio stream. It is a stream of 16 bits samples : in an other word, a stream of numbers between -32768 and +32767. On audacity, each number is matched with a number between -1 and +1 (it is a pure convention, the program could have printed -100%/+100%). The CD coding scheme is not compatible to higher set of numbers. The sound card which uses a comparable coding scheme is not compatible too. If you have a file with higher numbers (with floating point numbers typically), they can’t be played on the soundcard without clipping (a degradation of the sound).
If you compress this stream in MP3 and decompress it (you can’t send an MP3 uncompressed directly to the sound card), you have still a stream of numbers between -1 and +1, but you can’t consider a bit depth, because the precision is degraded differently according to the frequencies. (A simple A4/440Hz will have a relatively high precision on the 440Hz, and less on neighbours frequency which should be masked by your ears).
Try to convert the MP3 file back to a WAV file (CD audio), and you should roughly get the same loudness. Since MP3 compression is lossy, don’t expect the same loudness exactly.
Note that if the uncompressed audio stream is a stream of numbers between -0.5 and +0.5 (as reported by audacity), the MP3 should reflect this level and your smartphone will convert the stream back to -0.5 and +0.5. Not as loud as a normalized audio (-1/+1).
There is an other effect. If you have a recorded audio stream, you can normalize it and get an audio stream between -1 and +1. Many purchasers prefer an even louder audio file. Then some disc editors increase the gain depending of the actual loudness : the most silent parts are amplified the most, and loudest parts are not amplified (we can’t go above +1). This effect is named compression (which has no relationship with the MP3 compression).
Then even between two normalized audio streams (between -1 and +1), we can have different loudness because of the audio compression.
On YouTube and other media, the audio streams are not normalized according to what can be rendered the louder, but they try to adjust the audio stream according to what the ears hear. If you normalize the audio stream to -1/+1, the top loudness is named 0dBFS (decibel full scale). This is an interesting scale for audio conversion (all or most conversion can’t handle more than 0dBFS or +1), but is not natural for ears. (We can have two different signals at 0dBF which are heard at different levels by our ears). An other scale is defined (LUFS) which is made to compare the heard loudness of different audio stream. Then a media can harmonise a set of audio streams and make their loudness more or less equal. The idea is that YouTube measure the loudness level of your contribution and amplify it to make it -14 LUFS. It is not perfect (how should we match a classical music with an high dynamic range pianissimos - fortissimos with a rock’n roll with a more constant loudness ?) but is more adequate than a simple normalization to 0dBFS (-1/+1).
The audio depths has no relationship with the loudness. A typical audio file is a set of numbers which can be matched to a -1/+1 range. An high bit depth (24 bits) will have an higher precision. But a 16 bits 0dBFs and a 24 bits 0dBFS will trigger nearly the same signal on your soundcard (excepted the higher precision bits).
You can measure the loudness of different MP3 files with the Youlean VST (a VST is typically a plugin of other programs, but I guess Audacity should support such plugins). Audacity has also a native Loudness normalisation. https://manual.audacityteam.org/man/loudness_normalization.html