For desktop flows, we generally use JSON logs on a plain text file stored locally on the machine, but then have ELK stack set up to retrieve, parse and store those logs. So, we can always monitor the logs of each flow during runtime, if needed. This applies not only to error logs, but also informational messages that we also log, which are intended to help debug issues when they appear.
The general idea for logging in Desktop flows is using the On block error action to add some rules when an error occurs, then using the Get last error action to get the error details. This action returns a lot of details that are usually enough to handle any system exception. But if you also want to log business exceptions, you will also need to set some log messages manually. And then you need a sub-flow that logs the message somewhere. As mentioned, we use JSON into a plain text file. But you can also easily push those logs to a database or a SharePoint list. Both are perfectly viable options in PAD.
As to cloud flows, I suggest reading this article: https://dev.to/wyattdave/exception-handling-in-power-automate-4c4h
It has some great suggestions on how to handle errors. It does have some mistakes in some of those expressions that doesn't always work (especially in more complex structures), but once you get the general idea, you can easily implement that yourself, too. And, instead of sending those messages to yourself via email, you can also push them to a database or a SharePoint list. These are also perfectly viable options in PA cloud, too.
We usually send those errors via email to our support mailbox that is shared between the team, or a shared mailbox at the client side, where the relevant people can all see it.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.