It does depend on the record type, but some things like an invoice, sales order and customer payment all share the same base object in NetSuite of a transaction. By adding a new invoice it creates a new transaction, incrementing the internal id of the transaction object which is the base for the others, Meaning that the next sales order generated uses the next transaction ID rather than a sequential sales order internal id