If the previous owner installed a recent Luma version: Open System Settings, make a screenshot with Rosalina and look at the picture on your computer.
If there is no custom firmware I don't know a way of getting the exact number. But you could narrow it a bit down by trying to start a cartridge game with a high firmware on it. You will be prompted to update to a new version on the lower screen if the system has a lower version than the cart. The last digit is not increased by a cartridge update and this gives a hint which version is currently installed.