If you purchase a Microsoft 365 plan, you can move your files to the cloud and access them using Files On-Demand.
https://www.microsoft.com/en-us/microsoft-365/onedrive/onedrive-plans-and-pricing
When you open a cloud-only file, it downloads to your computer and becomes locally available.
https://www.youtube.com/watch?v=UzIA9uykIhE&t=43s
With Storage Sense enabled, the file can automatically return to being cloud-only.