How does Mafia work?

Ik Mafia isn't really a board game but I couldnt figure out where else to ask. To the point, I don't get how Mafia is supposed to be played. I've played it together with my friends but it feels kinda off, theres no flow to it. I don't get how figuring out who the mafia is supposed to go. The mafia can just lie when asked any question and nobody can confirm or deny. How is the interrogation supposed to go? Feels like it is just a guessing game (which it is but it's just so mindless, whereas in like Among Us we have tasks so you can base your suspicion on ppls actions at least).

Might be just us as a group, but I feel like we are missing something. How do you make the gameplay more interesting, how is it supposed to be played?

*Sorry if anything is confusing