To work out the customer id and customer details in a custom module we need to call a reference container in the layout page.
Here an example showing a reference container of custom Quote Block
<referenceContainer name="content">
<block class="JJ\Quote\Block\Quoteblock" name="my_tab" template="JJ_Quote::quote.phtml" cacheable="false"> </block>
</referenceContainer>
Use Cacheable to fetch each customer logged in or not and get the customer Id to custom module.
public function newFunction()
{
$section = $this->customerSession;
if($section->isLoggedIn()) {
$customer = $section->getCustomer();
$inactive = $customer->getData('customer_status');
}