Think of it in terms of a story, a protagonist can lose, the villain shows up and beats the crap out of the protagonist, but the protagonist won't die, the villain will find some convenient excuse to leave or something interferes and saves the protagonist.
Then there are times when the protagonist pulls an asspull power out of his ass to beat the villain or the villain does something stupid which allows the protagonist to win. That's how ryoma's protagonist status works, he is the universal protagonist, everyone is apart of a story, and in that story you have a role, even if you're the protagonist in your story, ryoma will take over your spot as the protagonist.
So all of that is due to his protagonist status, he isn't the one doing it, the plot itself does them, and then in addition to that, after going crazy he learns how to actively control the plot itself with 5 cards he has called event cards. With those cards he can basically see what role a person plays in a story, and he can decide what should or shouldn't happen, example "event 1: a girl falls out of the sky and i save her" instantly a girl falls out of the sky and he saves her, "event 2: I gained a new power to defeat the villain", he instantly gains a new power, "event 3: the villain dies", the villain dies, and so on and so forth.