Using Template Parts

The template part block is an advanced block introduced in WordPress 5.9 that can be used with a block theme or a theme that supports template editing. This block is best used to edit areas like your site header and site footer.