Make new images in posts have no link by default, instead of linking to the full-size file or attachment page.
add_filter( 'pre_option_image_default_link_type', function (): string {
return 'none';
} );
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.
On some sites, new images link to their own file, so clicking a picture opens the bare image and takes visitors off your page. This snippet makes “None” the default.
WordPress remembers an image_default_link_type setting for new images. The pre_option_ filter makes it always 'none'. Editors can still add a link to any image themselves.
Add a new Image block and open its link settings. No link should be set.