JSON:API resources error: "This resource attempted to serve data that contains unsupported resource types."
This error is the result of not setting the _jsonapi_resource correctly in the routing file:
MYMODULE.routing.yml
# Defines a route where a user's flaggings can be found.
MYMODULE.user_flaggings:
  # %jsonapi% is a placeholder for the JSON:API base path, which can be
  # configured in a site's services.yml file.
  path: '/%jsonapi%/MYMODULE/queue'
  defaults:
    # Every JSON:API resource route must declare a _jsonapi_resource. The
    # value can either be a class or a service ID. Unlike the _controller
    # route default, it is not possible to declare a method name to be called.
    _jsonapi_resource: Drupal\MYMODULE\Resource\MyQueue
    _jsonapi_resource_types: ['node--page', 'flagging--MY_FLAGGING_TYPE']