I got a new inner tube but it's letting air out I've tested the new inner tube overnight, to check whether it's letting air out, and it does. Is the tire damaged or the inner tube?
This is hard to tell from the outset, but:


Have you checked the inside of your tire before you put it back on? If it contains a piece of glas it will puncture the new inner tube. Just remove it in that case. The only reason to replace the tire would be if it is worn down and for that reason you can expect to have another puncture soon.
You might have damaged the new inner tube when fitting it. You will need to take it out again and inspect it and it will become obvious, if that was the case.
The valve could be the problem especially if the loss of air is very gradual. Put the inner tube into soapy water to find the leak.


In summary: take out the inner tube, find the leak, and inspect the inside of the tire before putting in a patched or new inner tube.