If 2022 works and 2023 doesn't it would be worth repairing the 2023 installation.
Download the 2023 installer and right click it. Choose Run as Administrator and pick repair for the installation.
Try activating.
If it doesn't activate try on a different network to see if there's something on the network stopping SketchUp 2023 from using that network.