Get all post embedded images

You can use DOMDocument to get every image from any page:

function testingdom(){

    $dom = new DOMDocument();
    libxml_use_internal_errors(true);
    
    $dom->loadHTMLFile('https://the_post_url.com/anyone');
    $data = $dom->getElementsByTagName("img");
    
    $srcs = array();
    foreach($data as $key => $dat){
        $srcs[] =  $data->item($key)->getAttribute("src");
    }
    
    $dom = null;

}
add_action("wp_head", "testingdom");

This way you should have every src in an array called srcs