You have several modules, but they all retrieve power from the Battery and that starts back at the Battery, it's RED terminal, then onto the Fuse Box in the Engine compartment.
It sounds like you may have blown a fuse or popped off a connector you shouldn't have when you were working around it.
So your modules get power from the main engine compartments' fuse block so I'd start there - grab the owners manual and start your investigation.
I'll add some more...
When the trunk won't "lock shut" it is because the switch mechanism that the system uses - needs to know the trunk is being closed, else it won't latch - so even though the latch mechanism might work, The latch on the car's trunk - needs to be "unlocked" or open in order to even grab the stay and hold to it.
So you know, on my 2018, when I pop the trunk to grab a wrench and unbolt the battery cable to work on the car, you can close the trunk and it will lock closed, even with the power off, until you hook up the battery cables and it gets power to work again.
So when something like that occurs, the trunks push button can only do so much, you did not mention using the keyfob to unlock the trunk - this would force the latch open so the next time it's shut, it will grasp and hold fast to the stay (that U-bracket on the body side) that is on the bottom recessed hole.
So if that doesn't work, then a wire - either on the trunk lid, or back at the body where the wire grommet meets the trunk at the hinge point, or a connector, or a ground point, is broken - or you have a pinch point further back - or a blown fuse and hopefully an intact wiring harness that caused the fuse to blow and not blown the wires open itself passing current until the fuse blew - losing continuity to the circuits it went to, further back towards the trunk.
You also may need to remove the rear trunk lid panel - the plastic one - to inspect the wiring and see if there is any damage.
It's far easier to look for a blown fuse first - you may even find some fuses are corroded or have lost contact and just need to be pulled - wipe off the tab contacts and then reinserted to re-establish contact so the circuit is complete.
Else? When some work was done to the car, it lost the ability of the car to "talk" to it's backside.
So then that means you may need to look for any Achilles' heels'; that the vehicle can suffer from.
The Body control Module - located by the Glove box - and so is the Fuse panel for the passenger compartment.
You'll need to open the Glove box, empty it's contents and then pry down and pull outward to release the cabinet from the panel to see that Fuse Box that may have your answer.
Now, before you go too far with this...
Did you check to see if you have Brake Light, Turn and Rear Backup and the rear taillights work?
Does your remote to unlock all the doors, and relock them - work?
Does the trunk button seem to make the Trunk lid latch work, just not stay closed?
The above might help narrow down this search a bit further - because only specific fuses pertain to those features, but if the Horn does not work yet the Lights and Auto-headlights work, then the issue can be a little more complex, yet simple to fix - you just have to find the connector(s) that are jarred loose from the BCM and re-fit and re-seat them back into their sockets on the module. But that is only is someone was trying to break into the car or someone kicked the front passenger side foot well panel too hard - dislodging the connectors - possibly breaking them.