MS don't put a hard stop when you hit the limits, and they've recently released the ability (or were discussing the ability about providing reports) where you can monitor api usage.
The 40000 you're seeing is the maximum number of api hits per real user per day to the underlying dataverse database hosting your portal/d365 apps/power automate flows etc.
The 6000 you're referring to could be either
1. the API protection limits to minimize performance degradation on your dataverse database (it's per user and per 5 minute sliding expiration)
2. The max number of api hits per real user per day if you're using PAYG plans or a couple of other non power platform licenses
Reference: https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations
fyi the license limits are separate from the API protection limits (the api protection limits are just for safeguarding the performance of your dataverse environments)
Also, from the article above, MS won't just stop your dataverse environments if you hit these limits, but they would probably keep reminding you to buy addition capacity add-ons or perhaps restructure your api calls to take advantage of the non-licensed user request limits. I'm guessing as a last resort they would throttle your dataverse environments until you paid for more capacity or bought a combination of different licenses per user