If you have two license numbers you can share a QuickBooks file over a local network. The two machines have to be on the same subnet. In most cases this means they have to be talking to the same local router.
You can share a file between two copies of QuickBooks using iCloud or another file sharing service. This sharing is one at a time though - only one computer can access the company at a time. It also requires QuickBooks Mac 2019 (you didn't mention which version you have).
If you want to have two machines simultaneously work on a file that is being shared on a Wide Area Network (WAN) you have to create a link to put the two machines on the same subnet and have two (or more) licenses. One way to accomplish this is discussed here: