In general I don’t believe you can tell any difference between MP3 and FLAC if you listen to the audio at the intended sample rate.
Meaning that @44100hz with 8 bit samples; you can’t tell.
Listening at higher sample rates with higher bits per sample; sure…there’s lots of room for unwanted and even audible error. Audio interpolation algorithms are not miracles, not smart, and not even close to being finely psychoacoustically tuned to your ears in most cases.
If you say you can hear a difference…you are lying or you are cheating by playing back the MP3 over an audio pipeline with a higher sample rate and bits per sample. Anyone could hear the difference when cheating like that. Human hearing can span all the way up to 128Khz; but oftentimes most people can’t notice a credible difference even at 96Khz.
But if you listen to a 44.1Khz signal via a 96Khz set of equipment; you’ll pick out exactly when the audio output shifts between being 96Khz and 44.1Khz.
This is how you can tell when audio is a recording at a lower sample rate. Most hardware is capable of outputting 96Khz so long as you don’t put older things in your audio chain (The pipeline from file to your ears, and yes this includes software and your operating system as well).
The problem usually arises when something is upsampled. Going from 44.1Khz to 96Khz is noticeable when you “Compress” the audio signal to boost apparent loudness. Most low-end equipment and unaware software will do this sort of operation automatically when upsampling your audio to make sure the process does not render your audio too quiet to hear. Your ears can hear frequencies being clipped or limited to a certain volume as well; which can also happen a lot to prevent certain issues. Because most people are unable to regulate this hidden software aspect of their playback chain; you can sometimes hear it.
Luckily if you spend some time with proper DSP software and/or hardware, you’ll be able to unmuddle/unmix these mistakes in your chain. It does take time and patience; and you’ll need a large blend of HQ audio (like FLACs or MQTTs) as well as your standard “downsampled” audio (like MP3s and other lossy tracks), and you’ll be able to tweak things so that everything sounds good.
Software packages like Viper4Windows or Viper4Android are good starting points and are often easy to figure out how to use and offer a very wide and diverse range of controls you can use to adjust the audio to your needs and liking.
Because everyone’s ears are different; there’s also plenty of tools that claim to adjust for your individual ears…and those can be helpful as well in chasing your perfect flat audio response curve and equalizing things to your preferences.