You need to obtain a manufactures data sheet to get the info you need to calculate the resistor value. You also need to know what voltage you will be using. The RPi GPIO pins are 3.3V.
When you have the data, current and forward voltage, and supply voltage, then you can plug the values into one of the numerous web site calculators which will tell your what resistor you need. This one will show you the nearest standard resistor size:
Also some LED's have resistors built in. If so they will be rated for a specific voltage and must be used at that voltage. Usually 3.3V, 5V or 12V.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.