Do you know what a p-trap is? That is the name for the pipe under your sink that is bent looking like a u. Every plumbing fixture needs to have a p-trap to prevent sewer gasses from leaking into your home. Your toilet has one of these, but it is internal, so you can’t always spot it from the outside.
A p-trap also keeps debris from going down into your plumbing system, causing clogs.
Depending on how the trap is made, there might be a removable plug that will let you access it to clean out debris that collects, but it might be necessary to take the whole pipe off to accomplish a cleaning. The way a p-trap prevents sewer gasses from seeping through is that there always is water standing in the pipe, forming a seal. Sewer gases don’t just smell bad, they are actually harmful to your health, so it is very important that you have a functioning p-trap.