When the company is profitable, part of the earnings may return to the investor as a dividend. A Dividend is not an expense but a shareholder fund (equity), which the declared value will be less off from the Retained Earnings.
The accountant may debit the Retained Earnings and credit the Dividend Payable account, which is a Current Liabilities account type when a dividend has declared.
Instead of directly debiting the Retained Earnings account, the accountant may sometimes debit the Dividend account (Shareholder Fund/Equity account), which is a temporary account, and transfer out from Dividend to the Retained Earnings account later.
Below is a screenshot of the equity section of a Balance Sheet report:
Check with your accountant for more information about the dividend.