How do I modify the respond body via a custom controller

System Information
  • Strapi Version: 4.25.5
  • Operating System: macOS
  • Database: SQLlite
  • Node Version: 20.10.0
  • NPM Version: -
  • Yarn Version: 1.22.21

How can I extend - or replace for that matter - the response body on an api endpoint via a custom controller? I have found 3 different ways in which you can modify a request on this page. But none of them seem to modify the response body of the API request.