Get Doc in of custom app

I would like to get settings from a single DocType in the of a custom app.
I implemented something like this settings = frappe.get_doc("Custom App"). This worked as long as the app was already installed. As soon as I wanted to install the app to another site or do some other bench stuff, there were always some fatal errors popping up which lead back to that command being run in the As soon as I commented it out, everything worked again and the app could be installed.

The question now is, how do I get the single DocType Settings in the Is there anything I need to add or is there another method?