Somewhere between very straight forward and quite tricky. That's all anyone can say without seeing the code!
Some code, including the code in some libraries, includes lines of code which are specific to AVR ATmega chips, sometimes even specific models of ATmega chip. These code lines tend to do something like accessing the internal registers in the chip which control pins and timers, for example. These lines of code won't work on other designs of chip, because the internal registers in those chips are different.
Code and libraries which use only the standard Arduino functions, those shown in the Arduino language reference, will generally work unaltered on any Arduino compatible board, including Teensy 4.
Some libraries, such as the Neopixel and FastLED libraries, have to use functions and code lines that are specific to particular chips. That's because there's no way to do it with the standard functions. These libraries contain versions of those code lines that are specific to several types of chip. The correct versions of those lines are automatically selected by the library when you select the board type you are using in the IDE and upload your code. These libraries will list the boards they are compatible with in their documentation.
For example here is the page for FastLED library. It mentions Teensy 2 and 3 but 4 is not mentioned! It might work on Teensy 4 but there's no guarantee.