Hello Taysir Al Saidi,
You didn't mention if you are getting any error or any specific challenge that you are facing while year closing.
Make sure you are following these. Screen shots are taken from D365 for your understanding.
--- Set below check boxes enabled in General ledger parameters form.

--- Select the "Retained earnings" account in the Accounts for automatic transactions form in GL setups for posting type "Year-end result".

--- While running year close; you are selecting the appropriate legal entity. Once you select the entity, automatically system will pick the retained earnings account.
--- Set the Transfer balance sheet dimensions check box enabled. By default all dimensions will be selected as "Close all".

--- Then run the year close after selecting the legal entity.

--- In the next form as it appears; select the fiscal year to close and write the voucher number manually.

Kindly check this in test environment first and generate the TB for current year and see if opening balance is updated in the "Opening transactions" column in TB or not.
Please provide your feedback once done.
Best regards,
Sourav Dam
Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.