At my university, I worked with a professor in knot theory for about a year. I am an undergraduate, and I wanted some experience in research. This professor was one I had a fairly good relationship with, and he actually helped me be able to skip some classes which I had already self-studied. Because I enjoyed the professor, I decided I wanted to work with him and his research group. However, I have discovered that I currently do not enjoy knot theory; it's a rather esoteric subject with few resources from which I could learn it from and gain some intuitive understanding, and one needs a solid grounding in topology to do much in it (I do not have a solid grounding in topology).
Ultimately, I didn't really do much during my research (I both thoroughly disliked it and wasn't able to do much; the latter fact probably influenced the former) and when COVID-19 hit I simply fell off on researching and communication with the professor. I fully realize that both my lack of effort while researching and the actual ghosting was quite deeply wrong. I have no plans to do anything similar to my current research mentor or any future ones regardless of how the research goes, so please do not lambast me too much for this. I now do research in physics (where I am much, much happier), but I feel quite horrible for what I did to my professor. To make matters worse, I have several books on topology that I would like to return to him (on somewhat of a tangent, Munkres's books, while good, are not exactly the most stimulating textbooks I've read, so I didn't learn too much topology). I very much want to apologize for my actions and offer to return the books, but I don't know how to do so gracefully. If any advice could be granted, I'd appreciate it immensely.