OK, think I solved the PHP Dummie question:
Used the_title_attribute instead, and explicitly set “echo” to 0 in the args.
<?php
$url = the_title_attribute('before=https://&echo=0');
$width = 300;
echo bm_mshot ($url, $width); ?>
That way I only have to put the domain name into the post title, e.g. “youtube.com”