wp_insert_post generates endless posts

If you want to create a particular page once, then you can save an option to the database once the page has been created, then check if that value exists before attempting to recreate it. If you store the page’s ID, you can also check if the post still exists and recreate it if it doesn’t.

add_action(
    'admin_init',
    function() {
        // Check if there's a record of the page.
        $archives_page_id = get_option( 'dailybayou_archives_page_id' );

        // If the page hasn't been created yet, or doesn't exist anymore...
        if ( ! $archives_page_id || ! get_post( $archives_page_id ) ) {
            // ...create the page.
            $archives_page_id = wp_insert_post( 
                [
                    'post_title'     => 'Archive',
                    'import_id'      => '1041',
                    'post_type'      => 'irl-today',
                    'post_name'      => 'archives',
                    'post_content'   => 'All of DailyBayou publications.',
                    'post_status'    => 'publish',
                    'comment_status' => 'closed',
                    'ping_status'    => 'closed',
                ], 
                false
            );

            // Save a record of the page.
            update_option( 'dailybayou_archives_page_id', $archives_page_id );
        }
    }
);