Overview

I will try JWT authentication, referencing the following article.

https://www.drupal.org/docs/contributed-modules/api-authentication/jwt-authentication

However, after trying it, it appeared that a paid plan subscription was required to use JWT authentication, and the investigation stopped there.

Prerequisite: Download and Installation

Install and enable the following two modules.

https://www.drupal.org/project/rest_api_authentication

https://www.drupal.org/project/restui

composer.phar require 'drupal/rest_api_authentication:^2.0'
composer.phar require 'drupal/restui:^1.21'
vendor/bin/drush en rest_api_authentication

Steps to Configure JWT-Based API Authentication

Follow the instructions below to enable the API and set up JWT-based API authentication.

https://www.drupal.org/docs/contributed-modules/api-authentication/jwt-authentication#s-steps-to-configure-jwt-based-api-authentication

However, at the point of selecting a method, as shown below, it appeared that selecting JWT required subscribing to a paid “Premium” plan.

Summary

Since the investigation is still ongoing, the information may be inaccurate, but it appears that the following module exists for JWT authentication:

https://www.drupal.org/project/jwt

Additionally, the following module appears to be available for using OAuth2:

https://www.drupal.org/project/simple_oauth

Next, I will investigate how to use the above two modules.