Best file system for external hard drive, to be used on both Linux and macOS?
Depending on the complexity of the file structure you want to store and other properties you might like - the easiest way to go is to use exFAT.
exFAT is fully, natively supported both read and write on macOS, and has been so since Snow Leopard 10.6.5 (from 2010).
On Linux the native support came with version 5.4 (from 2019). Your specific distribution might not yet be running 5.4 - in that case a FUSE implementation is available instead.
Note that exFAT is not well suited if you want to transfer file structures where you want to retain a lot of file permissions/ACLs, or if you have the need for a journaled file system (a file system that is more resilient to power failures and similar crashes).
In that case you might want to look into using APFS instead. APFS is the native file system used by default on modern macOS versions. It is however not supported directly by Linux.
Instead you can buy third-party support from Paragon Software.