Your question is URL Shortening System Design. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
System design of shortening url in 1st round
Explain how you would design a URL shortening service. Cover the API, short-code generation, storage model, redirect path, scalability, availability, abuse prevention, and observability. Clarify assumptions where requirements are unspecified. If machine learning is relevant, identify precisely where it adds value rather than forcing it into the core shortening path.