A mixer and an audio interface serve different purposes in a audio recording setup.
A mixer is a device that has multiple inputs where you can connect different microphones, instruments, and other sound sources. You can then adjust the levels of each input, apply equalization and other effects, and route the mixed signal to various outputs. Mixers are often used in live sound settings, but they can also be useful in a studio setting if you need to record multiple sources simultaneously and apply effects to them.
An audio interface, on the other hand, is a device that connects your computer to your sound sources. It provides analog-to-digital and digital-to-analog conversion, and it often has various features such as mic preamps, phantom power, and monitoring controls. Audio interfaces are essential for recording audio into a computer, and they can also be used for playback and mixing.
So, whether a mixer is better than