During the installation of your Ubuntu Server, you can have either a [DHCP] or [Static IP] address.
The Subnet address in Ubuntu will be the [Network Address], not the [Netmask].
In the Network Connections [Edit ens160 IPv4 Configuration]
When you think of a Subnet, you will think of this: Which is the [Netmask].
This will give you the error.
192.168.5.10 is not contained in 255.255.0.0/16.
This is because the above is the [Netmask] and not the [Subnet]/[Network Address] that is required.
[Subnet]/[Network Address]
For more information, please look at the
Subnet mask calculator«.