I want to cut a pizza slice out of a 2D circle using mouse input.

I understand this is probably not an easy task considering I haven’t found any code examples online that do something like this but if I wanted to take in mouse input lets say during a drag and use that input as soon as the user lets go of the mouse to calculate into some kind of slicing for a part of a mesh, what would I need to watch out for and what would be the best algorithms and data structures for this?

Search for constructive solid geometry… (CSG)

sprite slicers/fracturers could be probably modified for that:

https://github.com/sabikku/unity-sprite-cutter
https://github.com/mjholtzem/Unity-2D-Destruction
https://github.com/theGusPassos/cutting-sprites-in-unity-programmatically

but if you are always cutting that shaped slices only (user cannot randomly slice holes into pizza or other shapes),
then could be easier to just generate those parts manually as a mesh,
or even by draw into sprite texture… (cut area as transparent, and then “inverted” cut, or mask texture, for that slice)