I use this extension with Firefox:
https://addons.mozilla.org/en-GB/firefox/addon/easy-youtube-video-download/
When viewing a Youtube video you simply click on the big green 'Download as' button, which enables you to choose the format you want to save the video into (with MP3 options being included).
To be able to use it for the highest quality video though, as well as for MP3, the extension needs to think that you've made a donation to get the Pro upgrade. You can either choose to actually do so (donating as much or as little as you feel like, as there's no set fee) or you can simply click on this link
https://videodroid.org/thanks_for_support.html which (by putting the relevant cookie onto your computer) tricks the extension into believing that you've paid up. (I've actually made several donations over the years because I love that extension so much - but there's no need to do so if you don't want to).
Stream-ripping audio content from Youtube videos is, of course, illegal but I generally only use that extension to obtain audio that's not otherwise available. (e.g. performances by amateur choirs or tracks from albums that are no longer commercially available).