When does the Yoast SEO filter hook wpseo_sitemap_urlimages fire?

What I wanted to say in my previous comment:

This hook is only fired when the sitemap is being built. After that, it’s cached and always served from cache. That means you’ll never see any change on the frontend because it’s all cached.

To disable the cache you can use the following code during development:

add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_false' );

After that, the sitemap is never served from cache but always built when viewing the sitemap in the frontend. Then you’ll see some changes.