$bossbar set minecraft:vb.boss_mob.drowned_necromancer.$(id) players @a[distance=..40]
$execute store result bossbar minecraft:vb.boss_mob.drowned_necromancer.$(id) value run scoreboard players get @s vb.entity.boss_health