Only offer H2 to H4 in the Heading block, so editors can't add a second H1 or tiny H6 headings.
add_filter( 'register_block_type_args', function ( array $args, string $block_type ): array {
if ( 'core/heading' === $block_type ) {
$args['attributes']['levelOptions']['default'] = [ 2, 3, 4 ];
}
return $args;
}, 10, 2 );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Your theme already prints the page title as the H1, so an H1 inside the content creates a second one. H5 and H6 are rarely needed. This snippet limits the Heading block’s level picker to H2, H3 and H4.
Since WordPress 6.7, the Heading block has a levelOptions attribute that sets which levels appear in its toolbar. The register_block_type_args filter changes the block’s settings as it’s registered, setting the default options to 2, 3 and 4 for every new Heading block.
Add a Heading block and open its level menu. Only H2, H3 and H4 should be available.