There are two even broader terms for both of them: Game Maker, and Game Creator
The terms you were referring (artists, programmer, writer, designer, etc.), when unified as one term, it is called a Game Developer. This term is broadly used for those whose job is to improve/develop/emulate/evolve the game designs, such as story plots, characters, the interactions between this and that, level designs, etc. They develop what the game should be when you play the game. Game Developers may be split into finer terms, and how these terms are defined is up to the studio/team/company.
For the term, Game Producer, this term is used when a person also does the business side of the game.
The term, Game Programmer, is strictly used for those whose job is to program codes. I lightly disliked having that term used for meaning other things other than programming codes.
Example:
An indie game creator/maker would call themselves (gender-neutrally used singular pronoun in a plural form) a game developer, because that person (just one) creates all the assets of the game. If that person were to start marketing their game, then that person can also be called a game producer. If that person stops/halts/suspends their current game and moved on to the next game, that person's title may be changed. If that person starts to code, that person is called a game programmer. If that person wants to create graphics, that person is then called a game artist, but still retains the title, game programmer. And so on.
A person can retain as many titles as one can possibly can, only limited by their abilities. If a person were to master all levels of each role in a team, that person may be entited to the term, lead development team, lead team executive, or a hacker.
Again, all terms are highly disputable and may not reflect upon most companies/studios/teams out there.
This is my self-taught notes that were jotted down when I start my CS major as a freshman. Especially when I started playing Game Dev Story, by KairoSoft.