If you extend from Luma, you have all CSS of Luma. If you want to extend e.g. Magento_Checkout, you would create _extend.less in Magento_Checkout/web/css/source
If you want to override this CSS completely you would create _module.less.
I too came across this issue but the description of the error isn't entirely helpful. I had these errors in my cron_schedule table for cron jobs I had built into a controller class. Looks like Magento 2.4.2 doesn't like you doing that so I moved the code to be in its own class (not extending from anything) and voila errors gone.
Bit of a dirty fix here, but I hope this helps someone in the future.
So after countless hours of googling, it seems this was fixed in 2.4.2 - which is great except for muggins here who has a store running on 2.3x.
I don't even know where to begin when trying to patch my store just for this functionality. I gave it a go, but failed miserably.
Anway here's ...