Ubuntu 22.04 network error

You can see if a IP address is assigned with:

$ ip address show

And you can see the links and routing with:

$ ip link
and
$ ip route

To test the network you can ping a IP address directly example (googles DNS):

   $ ping -c 3 8.8.8.8

And you can see the name resolution in:

   $ cat /etc/resolv.conf

If ping works, it is likely the network configuration is no longer working.
It could be old settings or other issues. (some formats have changed).

  $ cat /etc/netplan/*

For example in the netplan ‘gateway4’ is deprecated and you should use ‘routes’ now.
For that specific example there is a write up:
netplan generate: `gateway4` has been deprecated, use default routes instead - Unix & Linux Stack Exchange

Well that should give you a start of a few things to look for.

Mark