If you're looking to learn D3 and/or have little experience with web development before embarking on developing a Power BI custom visual, then you are probably better starting with resources elsewhere that are more focused on this, such as the Learn D3 publication on Observable, or Codecademy's free course.
If you want an example that illustrates how to integrate D3 with Power BI, it's probably best to start with the developer documentation, but you can also look at the sample bar chart repo that MS provides. This contains the necessary integrations with the dataset including tooltips, properties and cross-filtering. I also have a repository here that supports a course I have written for Power BI that uses D3 (in my signature if you are interested), but the providers have allowed me to open-source it, and this may give you some further context.
Note that custom visuals do require a lot of overhead to wire things up and you may also need to write additional logic to make your D3-based code handle scenarios like dynamic property binding and responsiveness, as these are typically not used when folks build static D3 visuals elsewhere (so it can be straigthforward to get a basic D3 example up and running, but most of your time goes into making a visual fit in to Power BI). If you want a simple example without all the bells and whistles, I have a simple two part series here on how you may approach this with an existing D3 example you might find elsewhere.
Alternatively, if this seems like too large a task for what you are doing, you could try Deneb, which allows you to use Vega or Vega-Lite inside Power BI to design visuals more quickly. This has the benefit of being certified (which is a process you need to go through if you are developing your own custom visual and want this as an outcome). Similarly, you can look at visuals like Charticulator or PlotlyJS, which are more UI-driven.