If you have enabled UPnP on router, or explicitly forwarded ports to your PC, or you have put PC in DMZ zone. This means all the bad software is exposed to internet - thus external attackers can try to exploit them.
Btw there is one thing they can do with just your IP address - DDOS you. Meaning send lot of garbage traffic to your network connection, and in case your ISP does not protect you from that, it will prevent you accessing internet or cause packet loss and high latency. Which may not be a big of deal, but if you are playing online games or have a work Zoom meeting, it may be a big deal.
> Also, let's say another user also connected to your internet has a compromised device, does that mean the attacker can have full access to all pcs connected to this network?
Attacker will have access in a sense that they can create whatever connections to other devices in network. But whether they can exploit them depends on security of OS and application on other devices.