Static wired LAN IP without a DHCP router ("Link-Local Only") on Ubuntu 20.04

Solution 1:

On desktop Ubuntu you don't have to use netplan, as there is Network Manager with a nice GUI to configure networking parameters.

Since you want a static IP, in the Network Settings GUI, in the IPv4 tab, set the "Method" to "Manual" and not "Link-local only". Choose an IP address for your Ubuntu machine. This address should belong to one of private address ranges: 10.x.x.x, 172.16.x.x or 192.168.x.x. It is most popular to use the third one :) Let's assume that the IP address will be for example 192.168.200.1 (take care that the range doesn't collide with your WiFi connection; if WiFi happens also to use 192.168.200.x, choose another range). Click "Add" and in the "Address" column enter that address. In the "Netmask" column, enter 255.255.255.0. As you don't have any router on this network, leave the "Gateway" column empty. Click "Save" and after you disconnect and re-connect your wired connection, your configured address should be set on the interface.

Of course you must also set another static IP address from the same range (for example 192.168.200.2) on your RPi, but I don't know what OS do you have there and can't provide you more detailed instructions.