StackExchange usually tries to avoid questions and answers that are subjective and tend to generate opinion ... so I'll try to respond by discussing attributes that tend to be good for portrait photography. Near the end I'll discuss the trade-offs of the lenses you asked about.
I wouldn't necessarily limit yourself to just these two choices. Also keep in mind that you don't necessarily have to limit yourself to only lenses made by Canon (e.g. Sigma, Tamron, etc. are also popular). If on a budget ... a used lens might also let you acquire a lens that would normally be more expensive... but with a budget you can afford.
Angle of View
This is an important concept in photography. When you pair a lens focal length to a specific sensor size, you can work out the true angle of view for that lens on that camera.
But it turns out that if the focal length of the lens matches the diagonal measure of the imaging sensor, then the angle of view is considered to be "normal" (in other words... this matches the what the human eye perceives as normal.)
The Canon 6D has a full-frame sensor (36mm wide by 24mm tall). That works out to a diagonal measure of about 43.3mm. In other words, a 43mm lens would be considered "normal". Nobody makes a 43mm lens and 50mm is pretty close. A 50mm lens paired with a full-frame sensor (or 35mm film) camera is considered a "normal" combination.
Shorter focal lengths (e.g. 20mm) are "wide" and longer focal lengths (e.g. 100mm) are "narrow" (I hesitate to use "telephoto" because that has special definitions... even though you will commonly hear people refer to long focal length lenses as "telephoto" lenses.)
The reason it's important to know if a focal length is "wide", "normal" or "narrow" has to do with compression.
If you were shooting ... real estate photos ... or car interiors ... one trick to making a room or interior seem larger is to use a moderately wide-angle (shorter focal length) lens. This is because in addition to having a wider angle-of-view... the other effect it has is to stretch the sense of depth. This means the rooms or interiors seem to be bigger and more spacious (when the reality is ... it's a trick of the lens).
The opposite happens with long focal length lenses... they "compress" your sense of depth. Things that are far away seem closer. You could take a photo of someone using a very long focal length lens... your subject might be 20 feet away. And perhaps there's another person ... say 50 feet away. But the person 50 feet away doesn't seem very far... it seems like they are just a little further than the person who is 20 feet away. This is what is meant by "compression".
The take-away ... lenses can either "stretch" or "compress" your sense of depth. Often when a photographer switches lenses... it isn't necessarily because they want a wider or narrower angle of view... it may be because they are going after the effects of compressing or stretching the sense of depth.
Compression vs Wide-Angle Distortion and Portraits
If you take a photo of someone (dogs work great for this) with a wide-angle lens and get the camera fairly close to that subject, their nose will seem to be disproportionately larger than the rest of their face. The dogs face will seem much longer than it really is... with an extra big nose ... and the rest of the face (eyes, ears, etc.) will seem small.
This same effect happens with people and since vanity usually is an element of portrait photography and people tend to be sensitive about the size of there noses (most people want their nose to appear smaller) ... a lens that makes a nose look disproportionately large compared to the size of their face is usually not desirable. However... move the subjects back a bit and the facial distortion isn't such a big deal. Wide angle lenses can be great for some perspective shots (e.g. a "birds-eye" view shot where the camera is shooting down from above -- or even a drone shot).
For this reason... many photographers avoid using wide lenses for most portrait photography.
Depth of Field, Background Blur, and Bokeh
As my old boss used to tell me when I worked at his studio, "everything in the image counts". Think of your image as having a "subject" and in front of the subject you have a "foreground" and behind the subject you have a "background".
EVERYTHING visible in the frame counts and will be critiqued as part of the photo. When shooting indoors, I used to do a LOT of rearranging of furniture in those days... tidying up tables, moving plants around, etc. to create the picturesque scene for the portraits. Nothing could be out of place.
When shooting outside, you can't necessarily move things around ... and you are usually just limited to finding a better location to shoot.
However... one somewhat desirable feature is to have tack-sharp subject ... and an out-of-focus background. But not just out-of-focus... pleasantly out-of-focus. The "quality" of the blur is important to have a pleasing effect. This "quality" of blur is referred to as bokeh (frequently confused as being the amount of blur ... but it is the quality of blur that is important.) In addition to the blur being pleasant... it can hide a LOT of background clutter that you'd rather not have visible.
So what contributes to this blur?
There are multiple factors that contribute, but there are three big ones. These are:
- Focal length
- Focal Ratio
- Subject distance relative to background distance
A longer focal length lens will be capable of producing a narrower depth of field.
A lower focal ratio (larger physical aperture size relative to lens focal length) will also result in a shallower depth of field.
A closer subject and a more distant background (more subject vs. background separation) will also allow you to create stronger out of focus backgrounds.
If your idea of a portrait is the sharp-subject with a pleasantly blurred background (and not every portrait wants this) then those attributes above will help contribute to that effect.
When shooting portraits, another factor is the framing of the portrait. These can be things such as:
- Full-length (entire body in the portrait)
- Half-shot (waist up is in the portrait ... but not the lower half of the body)
- Head & shoulders shots
- Face shots
There are also environmental portraits ... outdoors shots where showing off the environment (woods, meadows, beaches, etc.) are part of the shot.
Also consider if the portraits will be shot indoors vs. outdoors because when doing indoor photography you need to consider the size of the room. You can't necessarily shoot a full-length portrait using a 200mm lens inside someone's home because you can get the camera far enough from the subject to do full-length framing without having to knock a hole in a wall so you can shoot from the next room.
Classically, the go-to portrait lenses for full-frame cameras are:
85mm (Canon makes an f/1.2 version, an f/1.4 version, and an f/1.8 version)
135mm (Canon makes an f/2 version)
There are photographers who will use a 100mm macro lens ... usually these are 100mm f/2.8. But this means they have a lens that can be used as a portrait lens or for close-up work (things like make-up photography where you want very close face shots to reveal make-up details).
There are photographers who will use a 70-200mm f/2.8 ... or even f/4 (because f/4 creates a lot of background blur at the 200mm end of the lens).
Of the lenses you asked about...
50mm f/1.8 STM ... this lenses uses identical glass to it's predecessor except Canon added aperture blades on the STM version giving it a more well-rounded aperture and greatly improving the quality of out-of-focus blur. That's the good news. The bad news is that using this lens on a full-frame camera wont produce much blur for full-length shots ... might can produce blur if doing head & shoulders or face-shots. It certainly can be used for environmental portraits and will do well there ... usually because environmental portraits don't call for out-of-focus backgrounds.
24-105 f/3.5-5.6 IS STM ... this lens will give you more versatility with range because of the variety of focal lengths available. That's the good news. The bad news is that it's a variable focal ratio lens. The f/3.5 focal ratio is only available at 24mm. As you increase the focal length, the focal ratio will also increase and by the time you are roughly half-way through the range (somewhere around 70mm) the lens will only offer f/5.6 as the lowest focal ratio available.
The point of these last two paragraphs is to point out that regardless of the two lenses, you will have some limits in what you can achieve and make sure you are ok with those limits. If you aren't ok with those limits, just keep saving until you can have a lens that matches your criteria.
A favorite resource for getting an idea of what is possible with a lens is the pixelpeeper.com website (which seems to be having certificate issues at the moment). But this website harvests data from Flickr ... where photographers leave the shooting info (EXIF data) in the image. This allows them to build a database that categorizes the images by camera model, lens model, lens focal length, and other factors.
E.g. if you wanted to see examples you could tell it to show photos taken using Canon full-frame cameras and the 50mm STM lens ... or the 24-105 f/3.5-5.6 STM lens. You can even narrow it down by limiting the shots to only those shot at specific focal ratios (or focal ratio ranges). The images are further "voted" on ... so the favorites float to the top of the list. This quickly allows you to see the better examples of what those lenses can do.