When you roll stats, you're specialising in a certain subset of weapons. Melee for STR, Ranged/Finesse for DEX. The game explicitly tells you to make eone of the two your highest stat.
If you are rolling stats you can often be good in both. If you can manage a 16 in both Strength and Dexterity you can be both a long ranged and close range combatant all the way to 20th level and do both of those very well as a fighter.
The classic 1E fighter with a Greatsword and a Longbow. I played one of these in my first 5E campaign as a player in Hoard of the Dragon Queen. She started with an 16 Dex and an 18 (I think) strength. She started with a Longbow, Leather Armor, a Greatsword and a Warhammer I think. That game eventually petered out.
Key here is 16 without any feats is good enough all the way to 20th level on the Fighter platform with a good subclass. Meaning you can be good (not great) at both ranged and melee. You can do this on point buy too, but it is a bit more difficult and you are really hamstringing the social and exploration pillars to do it. I would suggest a Half Elf or Mountain Dwarf if you do this on point buy.
In one fight I started with my Greatsword, switched to my Longbow after I downed a foe and then switched to my warhammer. We joked about my weapons being strewn all over the battlefield at the end of the fight.
She also had stealth and Thieves tools proficiency.
At lv1, you clhave to choose a Fighting Style. They're all presented equally as equivalent choices, and all bar 1 in thr phb enhance fighting with a particular subset of weapons, but you can only take one*. You're encouraged to specialise.
If you pay attention to the mechanics they are not equivalent. I can understand a newbie thinking they are, but not someone with experience. There really are only 4 viable choices (5 if you are playing exclusively tier 1):
Defense
Superior Technique
Dueling
Archery
If it is a low level campaign you aslo have two-weapon fighting.
Of these defense and superior technique are the most versatile. If players are new and don't understand that others at the table should help them. IF they do understand it and choose a weaker fighting style then they are making a choice.
At lv4 you can choose a feat, and you read through and see that for most combinations of weapons there's an equivalent feat. They take what you're supposed to be doing (weilding weapons) and make you better at one of them. Theyre all presented as equal, and most of these are mutually exclusive. They also match well to your fighting style: and you think, if i take both ill be even better! If I team up Archery style with PAM, then I might be diverse...but at every stage you'll have a feature not being used. You're encouraged to specialise.
Archery and PAM will not make you diverse. Archery and a strength ASI, on an already good strength, will make you diverse.