From what I’ve understood of category theory that sounds like exactly what you are looking for. I would recommend listening to the latest 3b1b podcast where Grant interviews Tai-danae Bradley who studies category theory, really fascinating.
https://en.m.wikipedia.org/wiki/Category_theory
https://open.spotify.com/episode/6v01kNIPZZTmQk483nFy3H?si=8...
Another category theory resource you may find interesting is Category theory for programmers by Bartosz Milewski. He also has a great video course on youtube. If you want a taste of what category theory is, you can checkout his interview on corecursive.