Dijkstra's algorithm solves the "Single-Source-Shortest-Path" problem and can fail with negative edge weights.
Floyd-Warshall solves the "All-Pairs-Shortest-Path-Problem" and handles negative edge weights correctly.
And not to forget: Floyd-Warshall is simpler to implement (ok, that may be opinionated).
When your graph has only positve edge weights, and you are only looking for a path from one fixed starting point, Dijkstra's algorithm will be more efficient. When you need all shortest paths between all pairs of vertices, however, Floyd-Warshall might be faster than running Dijkstra's algorithm multiple times (for each starting point once). However, in terms of efficiency, both approaches can be implemented in time complexity O(V³).
When your graph has negative edge weights, Dijkstra is not an option.
You find more information here: