I would suspect you are trying to use the PATCH and DELETE route with an empty / null ID.
EDIT: I just realised that you are actually giving the apiResource nothing to define the wildcard parameters because the URI is /, so... define a parameter:
Route::apiResource('/', CourseController::class)->except('show')->parameters(['' => 'id']);
or, give it a prefix segment
Route::apiResource('courses', CourseController::class)->except('show'); // {course} wildcard