You can get the category product table name dynamically using the Magento 2 Catalog module.
catalog_category_product
table used for category-product relation.
The table contains entity_id, category_id, product_id, and position fields to manage relationships with products. Continue reading “How to Get Category Product Relation Table name Dynamically Magento 2?”