What should be used instead of raw filter?
The raw filter is still fine to use. The filter is not deprecated, only the raw tag.
From the Drupal 9 theming documentation:

As of Twig 1.x, the raw tag is deprecated in favor of verbatim.

Looking at the Twig 2.x documentation, you'll notice that the raw filter is not deprecated.
However, in the Twig 1.x documentation for the verbatim tag you can see that it replaced the raw tag in Twig 1.12. This is the cause of the deprecation in the Drupal 9 theming guide.
Note that there's a notice at the bottom of that page that says the tag was changed to help prevent confusion between the raw tag and raw filter.

The verbatim tag works in the exact same way as the old raw tag, but was renamed to avoid confusion with the raw filter.