Create a GL Entries

Hello, everyone

I have made a custom doctype for withholding tax in my country. I would like to know how I can register this withholding in GL Entry, in case that is where it should be registered.
Otherwise, if the value of the withholding is not recorded in GL Entry then where is it recorded so that the general ledger can be affected?

Could someone please help me