Are you looking for the Joomla 4+ version of Sourcerer?
Sourcerer is a Joomla system plugin (that also comes with an editor button plugin).
Sourcerer enables you to place PHP and any kind of HTML, CSS and JavaScript code right into your content! Not only in your articles, but also in categories, modules, components, the head of the HTML page, etc.
You can simply place your custom codes right into your WYSIWYG Editor. The only thing you have to do is surround the code with the Sourcerer plugin tags. Easy peasy!
So with Sourcerer, now you can also use PHP scripts in your content. That opens up a great deal of possibilities.
Normally, most Joomla! Text Editors will strip parts of your HTML code, like JavaScripts (e.g. statistics scripts) and video embed tags. With Sourcerer you won't have these limitations.