Officially 365 is not supported on Win 7 because Win 7 is no longer supported by MS.
But in this article MS says you can still run 365 on Win 7 and they will still provide 365 updates
https://docs.microsoft.com/en-us/deployoffice/endofsupport/windows-7-support
<snip>
How to manage Microsoft 365 Apps on Windows 7 after January 2020
Version 2002 is the last version of Microsoft 365 Apps that you can install on devices running Windows 7. Version 2002 is available in Current Channel, Semi-Annual Enterprise Channel (Preview), and Semi-Annual Enterprise Channel.
This means that if you want to continue to deploy and update Microsoft 365 Apps on devices that are running Windows 7, you need to use Version 2002. If you try to install a newer version of Microsoft 365 Apps, such as Version 2005, on a device running Windows 7, you'll receive an error message.
</snip>
So that is a slightly newer version of 365 than Dianne cited.
.
The article says you have to use the Deployment toolkit to download and install the older version. In theory, after you get the old version installed you should/may be able to update it to current versions ... Here are some articles about the toolkit
Office Deployment Tool
You still can do "custom" installs", explicitly including or excluding elements of the Office bundle using a Business oriented tool called the "Office Deployment Tool". It is intended for Business administrators, but it does secretly support consumer Office bundles. It's tricky, intended for experienced administrators, not users, so it requires learning some XML coding. Here are some links to the tool, you'll have to do more research to use it:
https://www.microsoft.com/en-us/download/details.aspx?id=49117
.
https://config.office.com/
.
https://docs.microsoft.com/en-us/deployoffice/overview-office-deployment-tool
.
https://www.trustedtechteam.com/pages/office-deployment-tool-guide
.
Excluding Office apps typically saves between 200-500MB per app. Yes, that can be significant on the relatively small, 20-64GB SSDs, that were typically used on retail devices up to 2019-2020. On devices with larger SSDs it’s not worth the effort. Since Windoze now uses 27GB for it's installation and Office uses around 4-5GB, that doesn't leave space for anything else.
.