But IDK if it is that simple?
In general, that's the way it works. Your UK legal entity provides services to your friends US entity. You sent an invoice and they pay you like any other vendor they use with whatever standard process they use.
Each legal entity follows their local rules for accounting, taxes, reporting, etc.
Are there any weird things to keep in mind? Anything that can bite me in the ass?
Not really, if you set it up correctly. Make sure you have a supplier contract that spells out all the details up front: Liability, indemnification, purchase orders, invoicing process, non-disclosures, penalties, payment terms and currency, etc. There are probably templates for this stuff somewhere, if your friend doesn't have a standard supplier contract just yet.
Do I need to set up an Ltd?
I recommend it. In most case you will have some liability exposure and it's a good idea to buffer that through an appropriate legal setup. Example: if you accidentally use code that violates a patent or copyright and someone sues your friend in the US, you will be liable to them.
Bonus tip: Watch out for bank fees. International transfers can be slow and costly especially since the banking system in the US is archaic as compared to most other civilized places in the world. I have a US based LLC but I'm using an "international" bank account. This way I can invoice clients in US$, in Euro, and in UK pounds using local currency and local bank accounts. The transfers happen inside my international account at a much lower cost than most other banks would charge. I use wise.com. No advertising intended, but it's been working quite well for my business.