There is no free lunch when it comes to office - it works exactly the same as windows.. .
If you want to keep it legal, the methods is same as windows: You can either buy a 365 subscription.. or join one of the family sharing groups here
If you want to keep it gray, buy one of those 300-500/- accounts … Technically they are legit but legally they aren’t (typically volume 365 licenses sold in retail)
If you want to go YOLO then do what exactly what you would have done on windows for a free copy of regular MS Office (non 365)