It's clear that you don't grasp the basic concepts of lua from this command. While that is fine and it is still possible to create commands without learning lua first, I highly recommend you do because it will make your life much easier.
Okay, I'm going to preface this with the warning that I don't fully understand what you're trying to do, so I'll try to help you to the best of my ability but without knowing your end goal I can't guarantee it will make your command 'work'.
You say you want the code to place double quotes around 'name' and 'reason', which I assume are arguments to the function. However you don't state what you want to do with that. Do you want it to print them back to the player who ran the command? Something else?
So lets start from the top:
You have an if statement that checks if the reason is a non-empty string, with a blank body. Although this would work fine, it is not common practice. I would suggest instead to negate the if statement (if not reason or reason == "" then) and then run your 'else' code in its body.
In your else body you set reason to nil. I'm not sure why you're doing this. Reason is already either nil or an empty string if it proceeds to the else part of the if statement.
You're calling ULib.queueFunctionCall() on a ULib function which I'm not sure exists. It doesn't seem to be part of vanilla ULib because searching for 'givepoints' on the github repo returns nothing. Do you have an addon that creates that function? It would be pretty strange for an addon to mess with ULib's function table and add a function to it.
Lets say for sake of example that ULib.givepoint is a function that
does exist. You said in the beginning that you wanted the function to place double quotes around the name argument and the reason argument. When you surround something with quotes in lua, it interprets it as a string. You aren't sending '"<value of target_ply>"', you're just sending 'target_ply'. If you want to surround its value with quotes, then you would want to use the concatenation operator:
would result in 'string1string2'
Since you want to surround the target_ply and reason with quotes, you would do this:
target_ply = '"' .. target_ply .. '"'
reason = '"' .. reason .. '"'
Finally, in your call to ulx.comand() you pass 'ulx.givepoints' as the function, but the function you define above is called 'ulx.givepoint'
Hopefully this is a step in the right direction. If you can clarify more on what you're trying to do I would be able to help you more. Good luck.