Hello
To update Joomla itself, may I suggest the following article..
https://docs.joomla.org/Joomla_3.x_to_4.x_Step_by_Step_Migration
To you have updated Joomla, you can then update your template/modules by installing the Joomla 4 version of each via your Extensions Manager. If any errors appear in the frontend modules after updating, simply open the module settings and save to update the database settings for each.
Ciaran