Almost every node in Node-RED has no memory of previous messages. They each just get a message do their thing and forget it.
So you cannot split a message do different things and then point the wires at one node and get it to work. As that node will see two separate messages.
You can either rework your flow to make it series rather than parallel, or use one of the techniques to combine messages.
These techniques are either to use the JOIN node (also look at the split node) or to use context values to store the output from one route that the other then picks up. (there an example of how to set and get context values in the docs about the function node and also in the cookbook (cookbook.nodered.org)
Thank you very much @ukmoose . i will look into the ways you suggested
I wonder whether you would be better to feed the html nodes into Change nodes that set the topics to different values, then feeding those into a Join node set to generate key/value pairs. Then you would have both html results available in one message to pass to a single function node that does the work of X, Y and Z.