Before you do anything else, dig the car's handbook out of your glovebox (and the one for your audio system, if it's separate) and look to see if the code is written there. (It's often on, or inside, the front or back cover).
If it's not written down anywhere you'll have to pay to get it. Any main dealer can get it for you, usually just from the vehicle's registration number or chassis number (assuming that it's the original radio, fitted by the manufacturer, of course). That way you won't have to remove the radio to find its serial number.
Otherwise you'll have to remove the radio (which might require the use of a special tool), find the serial number and then use one of the online sites that offer to provide radio codes, such as this popular one:
https://www.radio-code.co.uk/
(Note that there are links, at the top of that page, to help you work out how to remove the radio and how to input the code).