Thanks for the clarifications.
I suggest you reinstall the audio driver as instructed below.
Download the latest audio driver from the Dell website (link below), uninstall the current driver, restart your computer, and install the driver you downloaded.
https://www.dell.com/support/product-details/en-us/product/latitude-15-3540-laptop/drivers
Driver name: Realtek High Definition Audio Driver
Version: 6.0.9835.1, A83
(Run the downloaded EXE file and follow the on-screen instructions to install the driver.)
You should be able to uninstall the current Realtek driver in "Settings > Apps > Installed apps". It should be named "Realtek Audio Driver" or "Realtek High Definition Audio Driver".
(If you can't find the driver to uninstall, install the driver I suggested in the link above.)
After reinstalling the driver, restart your PC and see if the microphone will work properly.
If the headset is plugged in, you may need to unplug it and plug it back in for it to work.
If the problem persists, let me know.
Feel free to ask back any questions.
Standard Disclaimer: There is a link to a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.