A family of Microsoft word processing software products for creating web, email, and print documents.
Office 2024 and Microsoft 365 use the same code base. There is no difference in the operation of the Paste and Match Formatting command if the software has been installed correctly.
Try creating a new user account (System Settings>Users & Groups), signing in to that, then testing if the problem still exists. If it goes away, it's an issue with the user profile part of your Office installation.
If the issue still exists, or you'd rather not move your user data to a new profile, try uninstalling Office following these steps: Uninstall Office for Mac Then reinstall from the Subscriptions page of your Microsoft account.