Hello akashkanaujiyaa,
Thanks for posting! It's definitely important to be able to play back video at the highest quality possible, and we'd like to help out. We understand that your 4K video plays as expected on your iPhone, but it may be showing some quality issues when you play it back on your Mac Mini M1, correct?
Does this happen with other types of video, or only 4K videos recorded from your iPhone?
Does your external display support 4K video?
Also, you might test this in a newly-created administrator account, which will help in determining if you have a system-wide or user-specific issue: Set up users, guests, and groups on Mac. Let us know the results.
Kind regards.