Retained Earnings is a special account in QB that is automatically populated. Note it has no balance on the Chart of Accounts, but if you double-click on it there you'll get a report with a balance and if you change the dates to All, you'll see a series of annual entries labeled "Closing Entry", the amounts for each are the net income for that year.
If you distribute income to partners or shareholders and use the Retained Earnings account on the distribution checks, you'll see them in that report as well, reducing retained earnings.