How to display title, description etc in block images?

Firstly, did you check that title on image and caption are set in block editor? Caption shows by default anyway, so I don’t see the reason to mangle block’s code to add it once again. Description attribute does not exist on image block, so it must be added programmatically for that to even function: [a list of image blocks attributes]
(https://developer.wordpress.org/block-editor/reference-guides/core-blocks/#image). I think you took a code out of context, so it cannot work without the context it was in.

If you want to display title attribute, it can be done this way, but best way would be to extend default image react component by using block hooks, however, this approach requires solid level of knowledge of react, so I guess it is too demanding to describe it here.

Code you pasted above should work, except for description attribute which does not exist.

In order to avoid this check if ($block['blockName'] === 'core/image'), you could also use this filter.

EDIT:
There is a new HTML API, you can as well check it, perhaps this could also help you in your development: https://make.wordpress.org/core/2023/03/07/introducing-the-html-api-in-wordpress-6-2/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)