in the applications token config have you set the token type to jwt? else you will get a token which you need to verify using token introspection in your backend
(ok may have misread your message so the authentication works using a frontend (with pkce/implicit flow) but you are unsure how to create a jwt using an api (service user)?
a jwt token should be generated by the user and forwared to the API using the authorization header Authorization: Bearer <jwt access token>Authorization: Bearer <jwt access token> your springboot app should then use the given token and verify its validity etc