I very much recommend Heavy Rain if you're a gamer that enjoys older titles.

If I remember right, I think this game came out sometime in the 2010's, so the graphics are a bit dated. However, its story plays out somewhat like a interactive movie, mostly asking for you to push a button or two to keep it going while making decisions. It also does have mild gore if that's something you try to avoid in games, so keep that in mind too.
Out of this list though, Ace Attorney and Danganronpa are definitely my favorites.

Firstly, they both have several games in their series, so if it does catch your attention, there will be more for you to play. Danganronpa has 3 games and AA has like 7 I think?

The big difference between each series is your protagonist.
In AA, you play as a seasoned lawyer, so you'll get to interact with crime scenes, collect clues, and take everything you learn from your own investigations into the courtroom. Most times, the culprit may be revealed to you early, but AA does this often between their games. You may know who did it sometimes, but it's mostly up to you to piece the story together to prove that they did it!
For Dang, this game is a classic. The premise is that you're in a murder game with other students and you play as one of those students. When a murder happens, it's up to you to figure out who did it, and this game doesn't tell you who did it beforehand. You'll really have to rely on your thinking skills for this game, as you have to get the answer right to continue the game. If you guess incorrectly even once, it's game over. Though, it's not as hard as it makes it seem. A lot of times, you'll find yourself going "Wait, so when that happened with X person, then!!!" and you'll be able to connect the pieces together to figure out the case. I caught myself excited for each twist more often than not and that "I got it" feeling of solving a case will happen a lot when playing this game.
Additionally, I would steer from Rain Code for right now. That game came out last year and was made by the creators of Danganronpa. It plays out differently than its predecessor, and it helps to have an understanding of Dang before jumping into that game.