Boot a portable linux OS. If it is a software problem, that will eliminate your Windows install.
You have other devices that don't loose connection at the same time as your PC?
Open a cmd.exe window and run ipconfig.exe /all and post the results.
That gives us some insight into your network config.
Yes any other device. whether its connected to ethernet or wifi works fine.
Here are the results-My wirless is working ethernet isnt
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) I211 Gigabit Network Connection
Physical Address. . . . . . . . . : 24-4B-FE-5E-57-64
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.45(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 04 April 2021 22:50:10
Lease Expires . . . . . . . . . . : 05 April 2021 23:15:45
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 194.168.4.100
194.168.8.100
NetBIOS over Tcpip. . . . . . . . : Enabled
Wireless LAN adapter WiFi 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek 8812BU Wireless LAN 802.11ac USB NIC
Physical Address. . . . . . . . . : 1C-BF-CE-74-41-C9
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2999:33f5:68fa:d37e%24(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.24(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 04 April 2021 22:59:57
Lease Expires . . . . . . . . . . : 05 April 2021 23:19:10
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DHCPv6 IAID . . . . . . . . . . . : 538755022
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-E1-4D-11-24-4B-FE-5E-57-64
DNS Servers . . . . . . . . . . . : 194.168.4.100
194.168.8.100
NetBIOS over Tcpip. . . . . . . . : Enabled