The study of knowledge, or what it means to know something, is a branch of philosophy called epistemology. If you are concerned with knowledge of right and wrong, you might be interested in meta-ethics. But there are lots of different ways to approach it.
One idea is that knowledge is a belief that you are very sure about that is also true. For example, someone could be very sure that the Earth is flat, but you might not say that they know the Earth is flat, because it is not. Or, someone might believe the Earth to be round but not really feel very confident about it, in that case they wouldn't be said to know it because they harbor doubt about their belief. I think this is problematic in that it seems to presuppose a level of certainty it is trying to justify, or refer to it recursively. (e.g., we know the earth is round because it is (it is because we really know it is (like, we're really sure it's round!))). Or we might accept this and the consequence that we can never truly know something, only just have very strong beliefs that we believe are true.
I like your idea about thinking of knowledge more as something that is built by our experiences and shapes our perspective of the world. Everyone knows different things and knows them in different ways due to the uniqueness of our lived experiences. But if knowledge is just something we acquire in our own ways, I wonder what that says about whether knowledge can be considered objective, or whether we might legitimately pursue "knowledge" in an objective sense and expect what we find to extend to other people's experiences, or hold true for all experiences.
My personal feeling is that knowledge isn't something that is just inside of us, just up to the individual agent, it seems like it is more of an internal relationship to an external thing; like the glue that holds our distinct yet intersecting hallucinations of the world around us in a sort of synchronization, allowing us to interact with each other predictably and achieve our individual goals.