the load() function is asynchronous and will not block the execution of the rest of your code.
You should await the result, or use a callback to access the loaded document (i.e. before trying to access the entity).
EDIT: You already had this link in your question (still a good read though).
The docs mention it here: https://docs.mendix.com/apidocs-mxsdk/mxsdk/loading-units-and-elements
I think this is what you are looking for: https://docs.mendix.com/apidocs-mxsdk/mxsdk/finding-things-in-the-model
It actually boils down to a one-liner:
const customerEntity = model.findEntityByQualifiedName("Customers.Customer");