You seem to have a phobia as I've read some of your other posts. The risks for hiv include unprotected vaginal or anal sex or sharing IV drug needles. Air and saliva inactivate the virus. So, a needle found on the beach. That is exposed to air, correct? And stepping on it is not injecting yourself, correct? Therefore, NO this is not a risk and you do not need to test. Apply this to all blood or needle fears you have. As long as you do not share injectable needles that you inject with (not just stick) and use a condom for sex, you are not at risk of getting HIV.
No worries, because you can't get hiv from non-sexual contact from sharing hollow needles to inject with which is the only other way to acquire hiv. Analysis of large numbers of infected people over the 40 years of hiv history has proven that people don't get hiv in the way you are worried is a risk.
HIV is a fragile virus in air or saliva and is effectively instantly dead in either air or saliva so the worst that could happen is dead virus rubbed you, and obviously anything which is dead cannot live again so you are good. Blood and cuts would not be relevant in your situation since the hiv has become effectively dead, so you don't have to worry about them to be sure that you are safe.
You contacted a sharp shell or a nail, so next time you get a pain, look at the object and identify it, then you won't have to go through this kind of fear that it was a needle. Even if it was a needle it was not fresh so the contents were dead, PLUS the contents weren't injected into you - but it wasn't a needle so it is time to move on from hiv.
See a therapist and try to put yourself out of this misery of imagining that you can get hiv while walking on a beach, and the other things you were worried about when your threads were closed.