N/config is the SuiteScript module for accessing NetSuite configuration settings, for example, general preferences, user preferences, company information, company preferences, enabled features, and accounting preferences, among others.
The pattern is simple: You load the target configuration (config.load()) which returns a NetSuite record on which you can get or set values.
const configRec = config.load({
type: config.Type.ACCOUNTING_PREFERENCES
});
const val = configRec.getValue(fieldId);
Challenge with N/config
To get or set a configuration value, you need the field’s ID. Recently, I needed to retrieve the Accounting Preference “Allow Inventory Transactions Dated Outside The Posting Period”:

I looked it up on the page that lists the internal IDs for various preferences but it is not listed there. Then, I started off a complex, unnecessary path (which you should not after reading this article). I figured I’d load the config object as illustrated above, get the fields via configRec.getFields(), log them to the console and try to figure out which one matches my setting. While that could technically work, it will take time and require trial and error as the field IDs are not always fully aligned with the screen names.
Well, do NOT waste your time doing that because there is an easier way.
Solution
The config object is a special record. Nevertheless, when it comes to field IDs, it behaves no differently than native or custom records. Simply click on the field label to expose the help text which contains the field ID:

The field ID of a NetSuite preference is the internal of the field which is accessible via the UI.
If the field ID is not visible, you probably have not enabled the user preference to “Show Internal IDs”.