Update useState value with useEffect with a simple example, React

I’ve seen this question being asked countless times, and just like others, I can’t spot an answer that makes me understand how you can work with it to solve the fact useState is an async function and will save its value until a new one is set, I’ve seen answers with useEffect, but I can’t get a correct notion of how you can use it to update the useState value, I’d really appreciate if some good Samaritan programmer could give me a very simple example of useState holding the value until it’s updated and how useEffect could update it instantly, so I can understand and implement that logic to my code, I also think this would help others like me.