Make sure you have selected the correct output and input devices in OBS "Settings" => "Audio" (see audio.png below).
This is a common mistake that users make when regularly switching between headphones and speakers. You basically tell OBS which devices are to be recorded. If your sound goes through your headphones but you have selected speakers in the OBS settings then it will record nothing, as there is no sound being transmitted to the speakers.
Right click on the settings icon of any audio track in the "Mixer" box and click on "Advanced Audio Properties" (see RMB.png below).
Here you can find a little bit more advanced audio settings and tools that you can play with to optimize your recorded audio from the selected devices and/or added mediasources, which can be music files or videos.
Then for you "Mic" and "Desktop Audio" select "Monitor off" under the "Monitoring" tab.
In this drop down menu you have "Monitor off", "Monitor only (mute output)" and "Monitor and Output". "Monitor" means the sound that you hear through your headphone or speaker. "Output" means the sound that will be heard in the stream or video. So you basically tell OBS what the stream/video should record and what should be heard only by you or the stream/video.
Lastly, uncheck every "Track" box of both "Mic" and "Desktop Audio" except "Track" box "1" (see advancedAudio.png below)
The "Track" boxes determine on which audio track the sound, coming from the selected device, is to be recorded on. So if you select for both "Mic" and "Desktop Audio" box "1" then both of the audio will be merged into one track. If you select box "2" for "Mic" then what you hear from the desktop or game will be recorded on the first track and what you say through the microphone will be recorded on a second track. When streaming and recording, having selected the wrong file format as output and having multiple tracks can make sound "disappear". So always make sure all your audio is merged in one track.
If everything above did not help then please send a screenshot of all your settings and devices, a video/stream example and the log file related to the video/stream.
You can open a log file by clicking on "Help" at the top bar of the OBS window then "Log Files" and then "Show Log Files". It will open a explorer window showing all your log files. Find the one with the correct date and time and upload it here.