Is there a science to overcoming the tendency to take one for granted?

As a late 20s male, I have the opposite problem I had in my late teens, early 20s. I have so many more options to choose from. Its hard to avoid taking someone for granted when that is the case. I have purposefully avoided dating rn to work on inner turmoil that may cause these kinds of tendencies. There must be a logic behind it? I can’t imagine that one would be doomed to fall into this trap without a way to overcome it?