Prime numbers primarily constitute the basis of cryptography (hidden writing) and cybersecurity, i.e. secure transmission and storage of digital data. They are used in mathematical algorithms that enable efficient encryption (converting into code) and decryption (converting to plain text) of data.
And everything starts with generating and selection of just two prime numbers. However, the generated primes must be really very high numbers for the purpose. The higher they are the better becomes security/privacy of communication between parties.
Beside that, the whole concept of cryptography relies also on the complexity of applied algorithms (ciphers). And these are still based on prime numbers and are evolving all the time.
Cryptocurrencies, such as Bitcoin, are also created with with cryptographic algorithms and rely on prime numbers for ensuring secure transactions and protecting private information.
Primes are used as well in mechanical design, machinery and engineering structures. Choosing primes for e.g. the number of gear tooth, blades, or similar structural elements, helps to ensure reduction of the wear of materials, reduction or better distribution of vibrations, eliminating unwanted resonances.
In machine design - uniform gear wear, reduced noise or desired gear ratios can be achieved by choosing the tooth counts to be co-primes (relatively prime), i.e. 7 & 12, 13 & 21, or 7 & 9 & 12. This is an example of gear with co-primed numbers of cogs: 7 & 12.
In electrical engineering - prime numbers are used in the design of power distribution system to improve the efficiency of the system.
There are also dozens of important uses for prime numbers in many sciences. So, if you are really interested and want to be better educated in the subject of primes and related to them algorithms it's worth to familiarize yourself with one of the most stimulating recent publications by Gary William Croft: "The Prime Spiral Sieve". It can be found at https://www.primesdemystified.com .