Once an unripe tomato is removed from the plant it will not ripen, it might go soft and turn a bit red but will never ripen.
Tomatoes need to be on the plant and in sunshine to ripen.
In my recent experience that isn’t the case.
We have quite a few green tomatoes on the plants so my other half picked two and stuck them on the windowsill (sunny kitchen location).
One of them started going red within a couple of days and was fully ripe in about 5 days. The other stayed green.
The non-ripening one had it’s little leafy bit attached (the other one didn’t) so I removed it and then next day it showed signs of ripening. 5 day later and it too had ripened.
Don’t know what effect the little leafy bit has, but it does seem to make a difference.