There’s reference information about adding custom claims to issued tokens at (OpenID Connect Scopes). In that page there’s a rule example for adding claims to an ID token, but a very similar approach would also apply to the access token.
You did not share the rule you are using to try to add the claims so it’s complex to guess the exact possible issue, but it’s important to note that custom claims need to be namesspaced as mentioned in the documentation.
Also you refer to the token using the format (JWT) the token uses, however, the service can issue different types of tokens and each will have one or more associated formats. For example, an ID token is always a JWT, but an access token issued for API Authorization will currently also default to be a JWT. In other words, it’s best to be explicit and refer to the type of token instead of the format.
You mention it is a JWT to call an API so assuming you defined this API in your Auth0 dashboard you would need to add claims to the access token.