Thank you for reaching out to EmpowHER with your question!
For pregnancy to occur, there must be actual sexual intercourse. The situation you described above is outercourse, which cannot cause pregnancy. I hope that helps ease some of the recent fears you've been dealing with about being pregnant.
This article does a great job at answering some of the common myths around outercourse and what can cause pregnancy: https://www.empowher.com/community/share/outercourse-dry-humping-dry-sex.... I highly recommend reading it!
Although you would not be pregnant from what you described, remember, the real only way to know is by taking a pregnancy test. I hope this helps!