During the installation of your Ubuntu Server, you can have either a [DHCP] or a [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].
[LINUX - IP Address with Subnet (Incorrectly Formatted)]
CFFCS | CarrzSynEdit: | CMD (Windows Command Prompt) | L (Linux)

Subnet 255.255.0.0/16
Address: 192.168.5.10


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]
[LINUX - IP Address with Subnet]
CFFCS | CarrzSynEdit: | CMD (Windows Command Prompt) | L (Linux)
Subnet 192.168.0.0/16
Address: 192.168.5.10

For more information, please look at the Subnet mask calculator«.