If you are asking how to "code" the changes it is possible to make interactively via the Settings --> Configuration Menus, something like this is probably what you want:
settings = {}
# general settings - companies - document layout
settings.update({"external_report_layout_id": env.ref('web.external_layout_boxed').id})
# accounting settings - taxes - default taxes
settings.update({"sale_tax_id": False,"purchase_tax_id": False})
# accounting settings - analytics - analytic accounting
settings.update({"group_analytic_accounting": True})
# apply changes
self.env['res.config.settings'].create(settings).execute()
Each App has a series of fields on the res.config.settings model that enable features and store configuration options, for the Accounting App you can see many of them here:
https://github.com/odoo/odoo/blob/18.0/addons/account/models/res_config_settings.py
You can also update records:
company = env.ref('base.main_company')
company.update({'name': 'ACME USA Inc.', 'street': '100 Main Street',
'city': 'Springfield', 'state_id': self.env.ref('base.state_us_5').id,
'zip': '90123'})
Activate currencies:
self.env.ref('base.AUD').update({'active': True,'symbol': '$AUD'})
Install Apps:
for app in ['stock','contacts','helpdesk','sale_purchase','sale_management','crm','web_studio']:
self.env['ir.module.module'].search([('name','=',app)],limit=1).button_immediate_install()
Change which view is the default for a Window Action (we don't want the Kanban view by default when looking at Contacts)
self.env['ir.actions.act_window.view'].search([('view_id','=',self.env.ref('base.res_partner_kanban_view').id)]).update({'sequence':5})