You need to use the appropriate 'use' statement at the top of your controller in Phalcon 5 -
use Phalcon\Mvc\Dispatcher;
Inside your controller action, you can use the Dispatcher to forward the request to another controller's action and capture its output, your code will be something like the following, similar but with changes from the older Phalcon versions -
use Phalcon\Mvc\Dispatcher;
public function yourAction()
{
$dispatcher = new Dispatcher();
$forwardedResponse = $dispatcher->forward([
'controller' => 'OtherController',
'action' => 'otherAction',
'params' => []
]);
$embeddedOutput = $forwardedResponse->getContent();
}