What is the difference in storage of a usb flash drive and sd card?
There is lots of detail missing from your question (including about the specific hardware being used). However I can explain one part which, from your question, seems to be missing from your understanding of the overall system - hopefully this will help you:


  I am working on a usb mass storage driver, but I am using a sd card to test it.


In that case there must be, somewhere in your hardware, a USB-SD controller. This is because, as you seem know, the SD command protocol is different from the USB MSD (mass storage device) protocol (and obviously they are electrically different too).

In many cases, the USB-SD controller is a separate IC. For example, such ICs are used in typical USB "card readers" and also in laptops.

There are (were?) a few SD cards which included a normal SD connector, and also a ("flip-out") USB connector at the other end of the card. Those SD cards effectively include a USB-SD controller (and a PCB-only USB type-A plug) within the physical SD card.


  SD card have some registers, which tells about its capacity and other parameters to the host, i.e PC


Yes, but that information is used by the SD host. In the case of an SD card connected to a USB-SD controller, the SD host is that controller, not the USB host (e.g. the PC). Depending on the USB-SD controller IC, you might have no way to access the SD card's internal registers using the USB MSD protocol from the USB host - unless that USB-SD controller offers a vendor-specific way to send specific SD card commands within special USB commands (some have this feature).

From the USB-side of USB-SD controller, for normal USB MSD operations, you don't need to know anything about the SD card or its protocol, since that is "abstracted" by the controller, so the SD card appears to be a USB MSD.

This is similar to USB-attached hard disk drives. Those disk drives will usually use a SATA interface, but somewhere (e.g. inside an external disk enclosure, but sometimes on the disk drive's PCB itself) there will be a USB-SATA controller, which abstracts (hides) the specific of the SATA interface, so the (underlying SATA) disk drive, appears as a USB MSD to the USB host device.

As already highlighted in the comments, depending on exactly what you are trying to do, and where exactly you are struggling, the topic(s) you need to research will vary.