The declarative schema was introduced with the introduction of Magento 2.3 to make the installation and upgrade process easier.
Declarative Schema files specify the structure of the database. Magento analyses the discrepancies between the actual table structure and the ideal one.
The file db_schema_whitelist.json is a log of all tables, columns, and keys added to the semantic schema. It can lead to a particular or create db_schema_whitelist.json Magento 2 using a method.
For a method to create db_schema_whitelist.json in Magento 2, Visit: https://meetanshi.com/blog/create-db-schema-whitelist-json-in-magento-2/