Let's say a person(18yo) exchanges nudes with a 17yo (not a crime where I live) who is living in Britain where it would be a crime. Could the UK arrest and prosecute the person?
Assuming this comes to the attention of the authorities in the UK, they could file charges, and apply for your extradition to the UK. If you were to visit the UK, you could be arrested and tried.
If an application for extradition is filed, the country in which you are located will decide whether to comply with that request. If that country has an extradition treaty with the UK, the terms of that treaty will be important to that decisions. Such terms vary.
Political factors are often taken into account in decisions about extradition. Your country's relationship with the UK, good or bad, may affect any such decision.
Many countries will not extradite for charges that are not crimes under their own law, but that is not universal rule.
Extradition cases require significant prosecution resources. Countries often do not file extradition requests for what they consider minor or unimportant crimes, or ones they do not expect to win in court. But that is a matter of policy and judgement, not of law. If the relevant authorities are intent on pursuing a particular case, for whatever reason, they can do so.
Let's assume we are talking about anything that is legal where you live, and not legal in the UK. The UK doesn't care whether it is legal where you live. On the other hand, the UK (mostly) only cares about crimes happening in the UK.
But then, they might consider sending pictures say from the USA to the UK to be "happening in the UK", not "happening in the USA". That would be logical if you consider the crime to be committed only if the photos arrive in the UK on the person's phone.
So let's assume that according to UK law you committed a crime in the UK. The UK will prosecute you if (a) police finds out about it. (b) They think the matter is serious enough to prosecute you. (c) They can lay their hands on you, for example because you are in the UK.
They will look for where you are and ask for extradition if they think the matter is serious enough for the extra work. They may have enough work with more serious crimes, so this seems not likely. It is less likely if they think their request will not succeed.
Your home country will likely not extradite you if what you did was legal in your country. Some countries will not extradite if they think the extradition is worse than the likely punishment for the crime. The UK lawyers obviously know what the US lawyers will do, so if you were in the USA, the UK likely wouldn't try to get you extradited, knowing that it is 99% going to fail.