OK, so your box has a red-black-white /3 cable, and a /2 cable. The whites are joined with a hokey splice. The blacks, plus a black pigtail to the switch, are joined with a hokey splice. It's definitely been "amateur hour" in there.
Well, you can see how the blacks have been pigtailed to the switch. Do the same thing to the neutrals, *except use a proper splicing technique for Pete's sake, like Wago Lever-nuts or at least a wire nut. Black and white provide always-hot and neutral to your smart switch.
The red wire is "hot when the lamp is desired to be on". Some sort of switching device needs to connect that to black at those times.
I don't know how your lamp is supposed to get turned on and off, but assuming the module controls the lamp, it will need the red wire for that.