Suppose that you already have an advisor and an ongoing project. Suppose that you are willing to get a "side gig" and that there is a professor you know at your school who is working in an area that interests you (which is not your main area of interest though).
How do you preface and then ask in a professional way the following question:
"Do you have any projects on which I could work under your supervision/with your collaboration?"
Basically, it is about asking for a small "side" thesis project to a professor who is not your advisor.