Yes, service definition (SD) files do consume credits in ArcGIS Online. Although not explicitly stated in the documentation, a service definition file storage is charged at a cost of 1.2 credits per 1 GB per month. Refer to ArcGIS Online: Credits by capability for more information on credit storage estimation. The summary chart of credit usage can be viewed on the status dashboard from the Status tab of the organization page.
In ArcGIS Online, a service definition file is classified under file storage type because it typically stores the required details to publish a web layer or service. The required details include properties, capabilities, service type, or data referenced through a GIS source. To conserve credits, the service definition file can be deleted when a feature service is published, as it is no longer functionally dependent on the service definition files.
Esri recommends retaining the service definition file if, the data must be updated and republished, the organization has future plans for another organization to publish the same service, or the data requires overwriting from ArcMap. Storing the service definition files facilitates the publishing process and avoids the need to re-upload the data for publishing. Overwriting a feature service in ArcGIS Pro is also possible without depending on the service definition file.