Ensure your project is at a standard rate like 44.1kHz or 48kHz for the best source quality before encoding.
Open QuickTime Player, select File > New Audio Recording , and record. The output is an Apple MPEG-4 audio file ( .m4a ). Tips for High-Quality Audio
What device are you planning to record on? I can provide if you tell me your setup.
If you need to trim your recording, you can use Online M4A Cutters or desktop apps like Audacity.