What's a provider in PyQGIS and how many types of providers exist?
Provider is a piece of code that reads and perhaps writes data from some source. The official providers you can find from the source code but there are also other providers that users have written for their special needs. Check these two directories:
GDAL and OGR providers can read any format that GDAL supports, that is https://gdal.org/drivers/raster/index.html and https://gdal.org/drivers/vector/index.html. It is possible to read some formats either with a native provider or by using GDAL/OGR (for example SpatiaLite).
You can use
QgsProviderRegistry.instance().providerList() to get the whole list of all available data provider keys.
# OUTPUT ['DB2', 'OAPIF', 'WFS', 'arcgisfeatureserver', 'arcgismapserver', 'delimitedtext', 'gdal', 'geonode', 'gpx', 'grass', 'grassraster', 'mdal', 'memory', 'mesh_memory', 'mssql', 'ogr', 'ows', 'postgres', 'postgresraster', 'spatialite', 'vectortile', 'virtual', 'wcs', 'wms']