I want to connect a display and Case with a fan on my RPi4B. However, I am not able to do so successfully because they commonly need GROUND and +5V pins which are right now used my 3.5 inch TFT display which connects using GPIO pins. Is there a way that I can use other pins instead of pins 4,6. for connecting the fans? This is the reference to the display https://robu.in/product/3-5-touch-screen-lcd-raspberry-pi/.. you can see image 3 for the pins used.
I would think about how you limit current to the fan, noise from he fan electrics and how you control it (on / off) - these are better suited to the electronics exchange but answers have been published here before.
As you only state the need for ground and +5, there are a few ways of connecting devices when the Pins are covered:
The simplest one (assuming the fan draws less than the max current for the board / port) is to break these out from a USB port. USB 2 is the simplest as the power / ground lines are at the outside of the four pins.
If this is too untidy, you can take the ground from the far end of the board here for a diagram and solder a wire to the +5V under the Pi board.
I have seen one other way that's too fiddly for me. The black plastic of the GPIOs was cut back around the 5V pin, a wire then wrapped around this and shrink wrapped in place and a HAT put on the pins above this wire. The +5 is too close to the ground for me to be comfortable with this but YMMV.
If your case is large enough then GPIO expanders are available. I use [this one] on a Zero W (with an Inky-phat on top) but others are available2 - these extend the pins out to the side of the Pi board and simplify connection.
Note: On the Pi, all ground and 5v rails are common so any pin (with the correct voltage marked) can be used. The 5v pins on the GPIO come direct from the power supply connection on the USB power socket.