Asking for a letter of recommendation after only some days of collaboration
The outcome of such things is unpredictable, but you might do well with this. But you can have a conversation first with this professor to see what they think of the idea.
Letters of recommendation are best when they make a positive prediction about your future success. It may be that this professor has already formed such an opinion and would be willing to express it formally.
You can ask, of course, but have a conversation first, getting their opinion on your future and how you can optimize it. A letter can flow from such a conversation.
Note that this is a US perspective and a personal one.