There could be a variety of reasons why the phone is plugged into headphones but not showing up, and below I will explain the possible scenarios and how to fix them.
Headset connector issues. First, you need to check the headphone connector and the phone's headphone jack. It may be that there is dust or impurities on the surface of the headphone connector, which is causing a poor connection, or it is not plugged in properly. At this point, you can try carefully cleaning the headphone plug with a cotton swab and making sure that the jack plugged into the phone is at the right depth to make sure the connection is secure.
Failure of the headphone cable or the headset itself. If there is a malfunction in the headset line or the headset itself, it may also cause the phone to not be able to detect the connection of the headset. You can try to change the earbuds to check if the phone recognizes the headphone connection, if the other earbuds can recognize properly, then the problem may be with the earbuds you were using before.
Problems with system settings. Some phones have the option to toggle the headphone output in the system settings, and if the audio output port is not set correctly in the phone settings, it may also cause the phone to not show the headphone connection after plugging in the headphones. In the system settings, find the Audio Output port option and make sure it is set up correctly as a headset.
Software issues. Sometimes, there may be a problem with your phone's software, which causes the headphones to not be recognized correctly. In this case, you can try restarting your phone to reset the system and apps, and then plug in the headphones again to see if they can be recognized properly.
The headphone jack is malfunctioning. In some cases, the phone's headphone jack may malfunction, such as because it is dirty or damaged. If the problem still cannot be solved after checking by the above methods, it is recommended to go to a mobile phone repair center for testing and repair.
Software Updates. If your phone's system hasn't been updated in a while, try to check if there's a system update available. Sometimes a software update with the latest version may be able to resolve the issue of the headset not displaying.
Check your headset settings. Some headphones may have special switches or audio mode settings, so you may want to check if similar settings exist on your headphones and confirm that they are set correctly.
In summary, the problem that the phone plugs in the headphones but does not show up can be caused by the headset connector, faulty lines, system settings, software issues, faulty headphone jack, or the settings of the headphones themselves. By examining the headphones and phones one by one, it is expected that this problem will be found and resolved.