In order to stop an attribute from being present in the ID token, you need to unselect that attribute from the list of readable attributes for the app client.
Please expand the "Attribute permissions and scopes" section in document  for reference to attribute read/write settings in an Cognito user pool app client. You need to modify the "Set attribute read and write permissions" settings (if you are using old Cognito console) or the "Edit attribute read and write permissions" settings (if you are using new Cognito console).
After you unselect an attribute from this list, that attribute will no longer be present in the ID token.
I believe the information is helpful to you. In case you have any further queries/concerns then please let me know.
Cognito User Attributes Modified Lambda Triggerasked 2 months ago
API Gateway: Using a Cognito User Pool authorizer to inject userid and email into requestAccepted Answerasked 4 months ago
Cognito Identity Pools Attribute-based access control - dynamic attributesasked 10 months ago
Can I create relationship from User pool to table in DynamoDB?asked 4 years ago
Amazon cognito - user attributes in ID Tokenasked 21 days ago
Cognito external provider user email cannot be automatically verifiedasked 2 months ago
Cognito User Pool not creating user in new pool after Migration Trigger runs succesfullyasked a month ago
Sign In with Apple not sending attributes for users who have previously signed in
How can I get MAU's for a Cognito user pool?
AWS Cognito External User Pool Identity Provider(OIDC)asked 3 years ago