You can get 2002 owners manual here:
https://www.ranger-forums.com/general-technical-electrical-18/ford-ranger-owner-manuals-1996-2011-models-3747/
Try page 106
Keyless entry uses a RAP(remote access personality) module, it is what activates the horn relay but ONLY if you press the LOCK button twice
So there may be another issue
Your picture doesn't look like the Fob in the owners manual, no Panic button, so.............
Also does your Door Ajar light work?
Does it come on when a door is open, and go off when its closed
It says in the manual that horn will do a double chirp if a door is not closed when you press LOCK button to let you know a door is not closed
If you have a bad Door Closed switch then horn would sound
You could locate your RAP module usually behind drivers seat and behind the plastic panel, usually has white or grey plastic housing
There will be a Yellow/green stripe wire, it activates the horn relay, cut it, but leave it so you can reconnect it
I don't think the RAP monitors that wire, but not sure
And if you wanted you could change the Horn fuse to Key on only power using a relay