I worked for Lenovo for many years in Engineering and there are different series that have different design and production. Thinkpads have more internal Lenovo control. Ideapads are more consumer. For several years they had G series that is much closer to an Acer as outside design and production with minimal control at Lenovo. They did this for cost and you purchased a low cost series.
It is expensive fixing things on the main circuit board in the laptop or about internal parts in general.
Most people with inexpensive or older laptops would rather use cheap fixes and workarounds instead of expensive ones.
You have three options of cheap fixes.
The 3.5mm is generally a 4 position 3.5mm female connector in the laptop. You can split it into headphone and microphone three position. At Amazon, and many other stores, there are headphone-microphone separators
This is a cheap company out of Hong Kong as long time to deliver usually but has good selections and pictures:
See the 4 position male pin 3.5mm
See the clearly marked headphone and microphone
You need to be careful not to get a splitter into two heaphones.
Your second option is a headphone+mic designed for 4 pin.
https://www.miniinthebox.com/en/p/jtx-702-3-5mm-noise-cancelling-mike-in-ear-earphone-for-iphone-and-other-phones-assorted-colors_p3194136.html?prm=2.5.1.9
Your third option is bypassing the audio in the laptop and changing to USB audio.
https://www.miniinthebox.com/en/p/orico-sk02-external-usb-sound-card-stereo-mic-speaker-headset-audio-jack-3-5mm-mini-cable-adapter-free-drive-for-pc-laptop_p6366427.html?prm=2.5.1.1
There are many sellers at various prices
https://www.amazon.com/...001DXNONI/
In the G40, it could be a connector issue or a short in the internal.
If you are confident about the 3.5mm headphone-mic splitter you already tried, try a USB audio solution.
You can also try internal software settings in case you accidental put the mic volume to zero.