Can you use XLR cable for guitar?
Assuming you don’t have some kind of Franken-cable running from ¼” jack to male XLR, then you’d have to go via a DI [Direct Injection] box, if only because the plugs won’t fit otherwise. If you do have a Franken-cable, throw it away.