Almost every WordPress developer has written this code at some point: putting add_action() calls right inside a class constructor.
It feels clean for small plugins. But sooner or later, this pattern starts fighting you.
Read the complete guide here: https://kishanjasani.in/why-should-developer-avoid-using-class-constructor/
