A very philosophical question, so I'm going to ramble a bit:
I think there cannot be an objective purpose to anything, because any purpose can only go so far. E g. if the purpose of life is to be happy, then what is the purpose of being happy? And what is the purpose of that purpose, and so on? It never ends, there will never be a final answer giving everything before it objective purpose, because that is not how purpose works.
Purpose is a human concept, designed to structure our lives and to help us come up with sub-tasks for bigger goals. And it only really works if we fill in the final goal by saying "because I want that, for whatever reason". For many someone else fills in that goal and we just follow it, maybe feeling a little empty inside.
So I think the real question is, how do you find that final answer, and the only thing I can think of is: Whatever feels right to you. And right doesn't have to be happy, right means true to yourself imo. If you had a nice day then it might mean happy, but if you had a shitty day then it might mean seeking comfort or some distraction.
The one thing that can make this very difficult is having expectations about what you should be or feel, and those expectations not matching up with your subjective reality. We all have them, from our upbringing, our peers and experiences, and they can often be very subtle and subconscious. But they are only useful if they help you find your true self imo, otherwise they can be very misleading and painful.