Use OSS CAD Suite first
The official docs call the binary suite the easiest way to use Yosys, and nightly builds target Linux x64 and Linux arm64.
If you want a native source build instead, the official docs provide Ubuntu prerequisite packages and a git-based build flow.