How to wire a 3 way switch that was a light fan and now only a light. Way to many may wires in one box, not sure how to connect
Let's get some colored tape, okay?  A 5-pack variety pack is $4-5.
Now, on the lamp, mark the black wire RED. Red is the preferred color for switched-hot, and presumably you want the lamp to be switched.
BLACK is preferred for always-hot.   YELLOW is Harper's preferred color for travelers.
These &quot;preferred&quot; colors are not Code requirements, but holy cow, they make life easier - especially next time you are in the box!
Up at the lamp, cap off the black wire with a small (orange) wire nut - won't be needing it.  Attach lamp white to ceiling white with a wire nut.  Attach lamp red (former black) to ceiling red with a wire nut.  Attach grounds and we're done there.
Now, you have no earthly idea which of the /3 cables goes to the 3-way vs ceiling, do you?   OK.

On the remote 3-way switch, cap off all 3 wires individually. Stuff is about to start getting hot.
Pick ONE of the 3-wire cables in the main switch box. Wire nut its white wire to the &quot;supply&quot; white.  Wire-nut its red wire to &quot;supply&quot; black.   Go turn the breaker back on.
Does the lamp light up?  We got the right cable, woot! We're done.
If not, turn power back off, unhook, and try the last step  with the other 3-wire cable.

Now you have identified the /3 cable going to the ceiling.  In the main box, cap off its black wire, you won't be using it until you sell the house.
Also disconnect the black from red wire that you temporarily nutted for testing.
The remaining /3 cable is the 3-way branch.  On both ends, use yellow tape to re-mark the black and white wires to yellow.  These are travelers and will go on the brass screws of both switches (brass = yellow, get it? :)
Back in the busy switch box, the two red wires are nutted together. These are switched-hot, thus, red.
At this point, in each box, only 1 wire remains unattached.  And the black screw of each 3-way is empty.  Do the obvious. And yer done.