You can add these lines to a CSS file:
box-shadow:8px 8px 8px silver;
Then you can add the class name fancyimg to any image, like so:
<img src='https://wp5000.com/wp-content/uploads/cat-whiskers-300x293.jpg' class='fancyimg'>
In FSE (Full Site Editing) themes, also known as Block Themes, it’s a bit more tricky. The Image block has an outer element which will usually show weird space around the image. For FSE, what you need to do is add the image as an HTML element.