The commands in the OP seem to just tag files as being hdr10 or hlg. No conversion is being done to actually take the input data, make it mean something and then map it to hdr-like signal.
Nornally,a raw file contains ‘data’ which you give meaning during raw conversion. What is black, and what is white and how is this distributed between them, to make it very simple.
At the end, this is ‘tone mapped’ to display space, to the old ‘low dynamic range’. Which had a problem. The minimum (see it as the 0 value) had a clear meaning. It was ‘nothing’. But the other side (the maximum, 1.0, 255 however to see it) had no clear meaning. It just meant ‘as bright as your viewing device can do’ but what means is going to be waaaay different between devices or viewing methods.
if you had to assign a meaning,100nits for the maximum is named some times.
Now, a hdr standard basically defines more meaning to how many nits the maximum really means. And a curve of mapping how the values between minimum and maximum are distributed. Like st2084 or hlg.
So you still have to do ‘raw editing’, but the range available in your final output is greatly increased. And you need to think about how bright things were in the scene, because they need to be aligned at more real defined values now.
Rec2020 is just a colorspace here. Writing things as Rec2020 doesn’t make it hdr… At all.
You could write the file as neutral as you can to a 16bit linear gamma tif. Then with ffmpeg zscale filter interpret it as linear transfer mode, but use the npl parameter to specify how many nits are assigned to your maximum value (you need to figure this out or experiment), then change the transfer characteristics to hlg or hdr10 compatible. Then encode it to an output format of your liking, one that has hdr tagging preferable.
Good reference hdr monitors are expensive and not many different types around.
If you are just experimenting, you could also do it the other way around. Find some hlg or hdr10 images, but with ffmpeg or another tool convert them as if they were NOT hdr. Look at the pixel data, and compare to the image viewed in a proper hdr viewer. That way you get some sort of idea of how it’s made. See what the transfer function does compare to good old sRGB.
Maybe a more simple way could be ‘an ordinary image is most often sRGB colors with sRGB gamma curve’. (or 709 in video world).
A hdr10 image is an image ‘in rec2020 color space and st2084 gamma curve’. A HLG image is an image ‘in rec2020 color siace and HLG gamma curve’.
By saving a file as rec2020 and tagging it as st2084 or HLG, you are not changing the gamma curve, just saying ‘act like it is’.
If you do convert the gamma curve, you’ll notice that two things can happen. Your source is interpreted as being a max of 100 nits or there abouts, and your created hdr file is using only a fraction of the range available. Or, no assumption is made, and your created file is using the whole range available, making everything waaaay to bright. You’ll have to do some tweaking here.