this is the best solution, for the given amount of info you have given. just change your number quick and move on. and play safe with nudes and intimate communication in general.
anyone threatens like such is an umbicile and doesn’t have what it takes to do any harm whatsoever. doing harm takes strength and by the sounds of it, they wouldn’t have any. chill. take a lesson.