@carike — Well, regarding your first reason, placement is exactly the reason I WANT to put it in a widget. I’m not trying to put this information in the post area. The goal is to replace an existing sidebar widget that serves the same function, but must be updated manually with each update. If I forget to do so, it defeats the purpose of the widget.
Building it into a theme layout would require recreating a bunch of core parent theme elements in a child theme, which creates the risk of causing technical problems when the parent theme is next updated. Worse, the risk in that case might not be obvious right away, which makes me uneasy. I use child themes, but I try not to recreate or replace more of the parent theme code than I have to, mostly to avoid that kind of problems.
I’m aware that widgets require more coding knowledge, but that’s why I asked this question in the first place.
I don’t use, or even understand, the Gutenberg block editor, so that is irrelevant to me. (I find it frustrating that WordPress is trying to push the block editor, honestly; why reinvent the wheel in such an unfamiliar, non-intuitive manner, which just confuses and frustrates the many users who aren’t developers? But, that’s another matter.)
Is there some technical reason why placing that in a widget wouldn’t work reliably or would cause problems? If so, that might be a good reason not to do it at all; I don’t think placing the code in theme files would be at all prudent for me.
Also, I’m puzzled by why Vasim Shaikh’s earlier reply (which outlined a way to execute exactly what I was proposing) was removed. I don’t know if Vasim did so himself, but if there’s some technical problem with the solution he proposed on Feb. 23, it seems like it would have been better to publish a correction rather than simply remove it.