Suppose someone tells God for example that if such and such happens I will do a certain good deed (e.g. fast 3 days).
If what they wanted comes true and they do the good deed, do they still get the reward of the good deed?
e.g. if they fast the three days, do they still get the reward of fasting for the three days or is the fact that their Hajat was granted itself considered the reward?

Yes they still get the reward for the good deed since it’s an act of worship, and they dedicated it to Allah. So the person will get the reward for the good deed such as fasting 3 days.