People seem to have decided that closed rpgs are somehow not rpgs, despite them actually being the more common form of rpg. Any game that has you assume control of a character that has a name, a role in the narrative of the game, either pre-made or not, and contains some form of character development (leveling), is an rpg.

A closed rpg is one where you basically have no choices, your character is predetermined and the story is predetermined, you are along for the ride, but not in control. Most of the Final Fantasy games are all closed rpgs.

An open rpg gives you choices, you create your own character within the role, and/or are given choices that have an effect on the story. This is your Elder Scrolls and most Dragon Age games.

If you're now thinking that this sounds like basically any game can be called an rpg, yes, you're correct, rpg is the most massive genre of games for a reason, and it's why we have a multitude of sub-genres to differentiate them, or they are referred to by genres that describe gameplay, instead of character development. Hack and slash is a genre of gameplay that began with tabletop games. Diablo is a hack and slash game, it's also an rpg. I think technically it's defined as an action rpg roguelite, but the last Diablo game game I played was II, so I haven't exactly kept up with development of the series.