Unfortunately "it doesn't work" doesn't say much about what didn't work and how it didn't work (did you get an an error? A warning? A blank plot? No data? Or ...?)
Below is a fully reproducible example. Please do a clean restart of R/RStudio (don't restore an older session), and then copy & paste the code below to verify that you can reproduce the plot.
library(tidyverse)
p3 <- read_csv("https://raw.githubusercontent.com/Clairinechendra/sbucks1010/main/p3.csv")
p3_plot <- p3 %>%
ggplot(aes(x = size_ml, y = n, fill = category))+
geom_col(position = "stack") +
theme_light()
library(plotly)
ggplotly(p3_plot)

Two additional comments speculating as to the issue(s) you're having:
- Perhaps the issue was with trying to read the CSV directly through the link you give at the beginning of the post: if you read data from GitHub, make sure you read data as "raw" data (see the revised link I use inside
read_csv
).
- As an intermediate step, always inspect the
ggplot
object (here: p3_plot
) prior to "plotly-fication". If that plot is empty/wrong, the issue is not with plotly
.