OHM’s law is not applicable for unilateral electrical elements like DIODES and transistors as they allow the current to flow through in one direction only.
For non-linear electrical elements with parameters like CAPACITANCE, RESISTANCE etc the voltage and current won’t be constant with respect to time making it difficult to use Ohm’s law.