I'm choosing this based on the perceived difficulty at the time I played it, and for that, I have to say FFXIII. I hit so, so, so, SO many brickwalls during that game because back then I would run from everything instead of grind so boss fights were absolutely heinous. Booted up one of my old saves for old time's sake and a mixture of understanding I gotta grind + experience playing other FF games I steamrolled all the bosses LMAO
As for hard games currently, I gotta say the Binding of Isaac and before someones inevitably tells me "ez lols" let me explain.
I've put an insane amount of time into this game across three platforms, I am good at this game, but it is hard ! Some bossfights you can steamroll no problem, others even have secrets to beating them instantaneously, and others are purposefully made super hard no matter the items, trinkets, and passives you've got stacked. It's taken me about two years to become familiar with maybe half of the items in the game, learn most of the bosses, and have a few synergies memorized-- I still have not beaten the Hush (an infamously hard boss fight because of it's health). This game is unforgiving to newcomers and the learning curve can be steep. Oh you want increased damage, sure but now you've got two hearts instead of three. Oh, you also want this very good item from the devil room? I'm taking the remaining two hearts you have-- hope you have spirit hearts or it's game over. Your down to half a heart with a pill that you haven't previously used during this run so It can be any pill? Here's explosive diarrhea, hope you don't blow yourself up ! The game even subtly taunt you by showing you your winning streak? now, how can that be a taunt? well, it goes below zero. Meaning, if you keep dying, you could find yourself at something like -47 wins.
My point is, TBOI is a very fun game but with constantly changing rooms and overall rng playing a huge role in how your run is going to go, your only chance at getting good is understanding you're gonna have your cheeks clapped time and time again. And the minute you think you're getting good? Great, move to hard mode and let me know how the champion versions of not only the regular enemies but bosses go. This game's longevity over the years comes from how difficult and neverending the game gets, and character and item unlockables make it hard (hah) to put down. But overall, the hardest game I've ever played is TBOI.