The audio interface allows for sonic malleability over what’s being recorded. An instrument can usually be plugged directly in (DI) to an interface or a microphone is hooked up to record that way.
If you want to record guitar, bass, drums, keyboards, vocals, etc, then you’ll almost always need an audio interface. An audio interface is like a middle-man between any respective recording software and what’s being recorded.