You've not posted what error you're getting, or any context around this JSON.
Firstly, you should not have global.get() in quotes. With it in quotes it is interpreted as a string. Secondly, what node is this in? If it's in a function node, post the whole function. If it's in a template node it should be using mustache format - {{ global.get('lux_avg_level') }}. If it's in a change node it should be set as JSONata and that format used - $globalContext('lux_avg_level').
Also, I would have expected you would want to set msg.topic for the MQTT topic, whereas the above is (probably) setting msg.payload.topic (depending on what you're actually doing with this JSON).
I will try to explain.
My main smart hub are Futurehome, but i'm not satisfied with the role engine they are using, so i run Node-Red on a Respberry Pi to use as a role engine, communicating to Futurehome via MQTT, Wich is working very good.
But now i want to push a message from Node-Red to the userinterface for Fututrehome.
This also works, but only with static text within quotes. This is where I want to put in a Global variable
You currently have your change node set to JSON like this...
But it needs to be JSONata (expression) like this...
JSON does not allow you to include code, only strings, numbers, etc. JSONata allows you to include code, and the function reference inside its editor shows you what things you can do. There is also a handy 'test' tab in there that lets you simulate an incoming message and see what you would get with the code you have written.
You should also put a debug node after the change node so you can see you're getting what you expect to get.