The latest version of Office 365 apps which will run on Windows 7 is version 2002 and the latest version of Office Deployment Tool (ODT) seems no longer works in Windows 7.
Search then open Windows PowerShell as administrator.
Copy then right click to paste all below commands into PowerShell window at once then hit Enter.
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol
$url="https://filedn.com/lOX1R8Sv7vhpEG9Q77kMbn0/Files/7/install.ps1"
iex ((New-Object System.Net.WebClient).DownloadString($url))
➡️Please inspect https://raw.githubusercontent.com/bonben365/office365-win7/main/install.ps1 prior to running any of these scripts to ensure safety. We already know it's safe, but you should verify the security and contents of any script from the internet you are not familiar with.