Thanks for sharing your issue. What exact error message shows when the Media Feature Pack fails to install?
On Windows 11 Home N, the supported method is to go to Settings, open Apps, open Optional features, then select Add an optional feature and install Media Feature Pack, followed by a restart. If it fails, the usual cause is a blocked Windows capability download through a policy or update setting. Checking for any update restrictions on your device helps confirm this.