$post->ID calls for current page, but what is the code to call for any new page created and published in WordPress?

If you are looking for the ID of the every published page, then you need to query them all. To do so, write a simple query that grabs every page from database:

$args = [
    'post_type'      => 'page',
    'posts_per_page' => -1 // Query all pages
];

$pages = new WP_Query( $args );

Now, run a loop through the queried pages and use their IDs. It’s better to use get_the_ID() to retrieve the ID, instead of messing with the globals. Here’s how to:

// Define an array to use in the loop
$ids = array();
// Run a loop and check if it has any pages/posts
if( $pages->have_posts() ) {
    while ( $pages->have_posts() ) {
        $pages->the_post();
        // Add the current page ID to the array
        $ids[] = get_the_ID();
    }
}

Now you have an array of page IDs inside the $ids variable.